R12.2.9 Host Concurrent Program - Errors when calling sqlplus from host
I am not sure if this is the right forum but I am hoping for some help, so putting it here.
We have a HOST concurrent program. The host file snippet is given below
When this is run, sometimes it works correctly, sometimes, it gives a weird output.
The code below is to get the output file path of the concurrent program whose concurrent program id is passed as parameter to the program( $PGM_REQUEST_ID)
########
#!/bin/sh
# File Name : XX_CUSTOM_FILE
...
...
...
PGM_PATH_O=`echo "set heading off
set echo off
set line 1000
select substr(outfile_name,1, instr(outfile_name, '/', -1) -1) from apps.fnd_concurrent_requests where parent_request_id = $PGM_REQUEST_ID;