I have created the Rquest setin oracle apps.
In which
10 position i am executing report &
20 position i am callling script
#!/bin/ksh
# Get reguest id
REQ_ID=Request id of Previous report (10)
REQ_ID="`echo ${REQ_ID}`”
CONN_STRING=`cat $ORACLE_HOME/reports60/server/CGIcmd.dat |grep $TWO_TASK|grep html|awk ‘ { print $2 } ‘ |awk -F= ‘ { print $2 } ‘`
FILE=$APPLCSF/$APPLOUT/o$REQ_ID.out
EMAIL_ID=`sqlplus -s $CONN_STRING <<EOF1
WHENEVER SQLERROR EXIT FAILURE ROLLBACK
SET HEADING OFF
SET FEEDBACK OFF
SELECT decode(mail_alias,null,’swapnil_tamhane@yahoo.com’,mail_alias) || ‘,’
FROM mailtable
WHERE group_name = ‘MAIL GROUP’;
exit success;
EOF1`
EMAIL_ID="`echo $EMAIL_ID`”
mailx -s “Report file of Request id:$REQ_ID $FILE” $EMAIL_ID <$FILE
Problem : No i am struct up how to get the REQ_ID of Position 10 so that i can derive the name of the output file.
If you have any other solution then u can advice me.
Thanks in advance.