1.use utl_file and write it to a file and then extract the value
from that file to a unix variable.
2. Write a pro*c program.
02-02-2001, 10:39 AM
The magic of ksh. You can just embed you sqlplus command inside some forward quotes and bingo, your variable is set.
THE_VALUE=`sqlplus -s system/manager <
set feedback off
set echo off
set pages 0
dbms_output.put_line(ODSLOAD.FUNC_EXTRACT_TRAILER ( 1 ));
# end of ksh
This way, you can check the value of $? to see of the sqlplus command was successful and also get your value back.
02-02-2001, 11:51 AM
THis might be a stupid question, but I can get the value for $?, which tells me whether the SQLPLUS command was OK.
Where do i find the value that was sent to DBMS_OUPUT by using $...i.e. the result of ODSLOAD.SP blah blah blah?