Link to home
Start Free TrialLog in
Avatar of carlino70
carlino70Flag for Argentina

asked on

UTL_FILE.PUT_LINE from two scripts

Hi Experts, I have a main script:
000_inicial.sh

Open in new window

(see atachment)
This script generates:
000_inicial.sql

Open in new window

with the data to pass to another 2 scripts:
@ 01_puntos_5min.sql 008
@ 02_estaciones.sql 008
@ 01_puntos_5min.sql 009
@ 02_estaciones.sql 009

Open in new window

008, 009

Open in new window

are the values obtained from the main cursor.
I hope to get in each case, one text file:
puntos.txt
estaciones.txt

Open in new window

Each separate works OK, but when you run them in the same script, the text files are generated only for one of the 009 variables, missing lines 008 value.
This missing a step or loop?, Maybe you can help me diagnose the error.
Thanks in advanced
Regards
000-inicial.sh
000-inicial.sql
000-directorio.sql
01-puntos-5min.sql
02-estaciones.sql
xpuntos-table.sql
insert-xpuntos.sql
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

You don't show the code with UTL_FILE in it.

My guess is you just do a normal open on the file which does an open-truncate.

You likely want and open-append.

In the FOPEN use an 'a'.

http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/u_file.htm#i1003526
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of carlino70

ASKER

It works. Excellent Mr!

Thanks for the solution and the recomendation!

Regards