You are on page 1of 5

How to create a HOST based concurrent program

By: Rahul Gupta


L.G.Electronics, Greater Noida
ecengineer84@gmail.com

Step 1 : Create the shell scripts .


In our case we have to transfer the output file of a concurrent job from our HOST server to a remote server.
Create the script wit the name <script_name>.prog ( Ex: Rajeev_ftp2.prog ) . Script that we created is
mentioned below..

[ilerpdb01:oraprod] /u11/app/ilprodappl/ese/11.5.0/bin> more rajeev_ftp2.prog


ORACLE_TERM=vt220
TERM=vt220
ORACLE_HOME=/u11/app/ilproddb/9.2.0
ORACLE_SID=ILPROD
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_HOME ORACLE_SID PATH ORACLE_PATH
> /home/users/oraprod/r1.txt
> /home/users/oraprod/r.txt
sqlplus -s apps/apps@ILPROD <<eof
set heading off
set feed off
set echo off
set time off
spool /home/users/oraprod/r.txt
select outfile_name from apps.fnd_concurrent_requests where
concurrent_program_id in (157551,150942) and requested_by='9297'an
d trunc(actual_start_date)=trunc(sysdate) and status_code='C' and
phase_code='C';
spool off
exit
eof
cd /home/users/oraprod
cat /home/users/oraprod/r.txt | awk 'FNR>1' > /home/users/oraprod/r1.txt
cd /u40/oradata/ftp_loc
rm *.out
for i in `cat /home/users/oraprod/r1.txt`
do
filename=`echo $i`
cp $filename /u40/oradata/ftp_loc
done
##xx_file_name=`cat /home/users/oraprod/r1.txt`
ftp -n 204.90.92.76 << END_SCRIPT
user LG_INDIA nUgS92866
binary
cd upload
lcd /u40/oradata/ftp_loc
pwd
prompt
mput *
bye

After creating the scripts, move it to the bin folder of the Application Top under which you want to register
this program. As in our case we have to register this program under ESE Application (Customized
application TOP on our site) .Thus, we created the script in $ESE_TOP/bin

Step 2 : Register the Executable


Go to sysadmin -> concurrent-> program -> executable
Step 3 : Register the Concurrent Program

Go to sysadmin -> concurrent-> program -> define

Step 4: Add the concurrent program in the request group of a responsibility.


We are adding it in the request group of the responsibility CORP_LOG_ADMIN_USER . Request group of the
responsibility is “LGEIL ESE GROUP_SUPER “ .

sysadmin ->security -> responsibility -> request


Step 5 : Linking with the fndcpesr
Fndcpesr will take care of your 4 mandatory parameter. Your script will be passed at least 4 parameters, between
$1 and $4.
These are:
orauser/pwd,
userid,
username,
and request_id

Any other parameters you define will be passed in $5 and higher.Make sure your script returns an exit status also.

ln -s $FND_TOP/bin/fndcpesr /u11/app/ilprodappl/ese/11.5.0/bin/rajeev_ftp2.prog

OR

Copy the fndcpesr to the $ESE_TOP/bin with the name rajeev_ftp2


cp $FND_TOP/bin/fndcpesr u11/app/ilprodappl/ese/11.5.0/bin/rajeev_ftp2

You might also like