#!/bin/sh
sqlplus -s "/ as sysdba" << EOF
SET HEADING OFF
SET FEEDBACK OFF
Select
pt.user_concurrent_program_name , OUTFILE_NAME
FROm
apps.fnd_concurrent_programs_tl pt,
apps.fnd_concurrent_requests f
where
pt.concurrent_program_id = f.concurrent_program_id
and pt.application_id = f.program_application_id
and f.RESPONSIBILITY_ID = 52431
and trunc(f.request_date) = trunc(sysdate);
above is the code which show below output
Cotton Stock Report (Net Weight)- Customized
/opt/ora/oracle/inst/apps/PROD_darwin/logs/appl/conc/out/o16735454.out
Daily Yarn Clearance Summary Report (NCML / ESML) -Customized
/opt/ora/oracle/inst/apps/PROD_darwin/logs/appl/conc/out/o16735457.out
Lab Test - Customized
/opt/ora/oracle/inst/apps/PROD_darwin/logs/appl/conc/out/o16735462.out
first row is the report name and second row is the report output location.
now i want to write loop to copy the file from output location and save to opt/report folder , Further rename it with report name column.