Oracle Applications Steps To Register Shell Script As A Concurrent Program

Posted by Jiltin     13 April, 2009    12,013 views   

There are two methods to handle, one with symbolic link another without symbolic link.

step 1: Place the .prog script under the bin directory for your applications top directory.
For example, call the script SHELLDEMO.prog and place it under $XXCUS/bin

step 2: Make a symbolic link from your script to $FND_TOP/bin/fndcpesr
For example, if the script is called SHELLDEMO.prog use this:

ln -s $FND_TOP/bin/fndcpesr SHELLDEMO

This link should be named the same as your script without the .prog extension.
Put the link for your script in the same directory where the script is located.

step 3: Register the concurrent program, using an execution method of ‘Host’. Use the name of your script without the .prog extensionas the name of the executable.
For the example above: Use SHELLDEMO

step 4: Your script will be passed at least 4 parameters, from $1 to $4.

$1 = orauser/pwd
$2 = userid(apps)
$3 = username,
$4 = request_id

Any other parameters you define will be passed in as $5 and higher. Make sure your script returns an exit status also.
Sample Shell Script: First method uses symbolic link.

#!/bin/sh
#Note: If you see # in front of any line it means that its a comment line not the actual code
# =========================================================
# Script Name : SHELLDEMO.prog
# Developed by Jay
# =========================================================
#Parameters from 1 to 4 i.e $1 $2 $3 $4 are standard parameters
# $1 : USERNAME/PASSWORD OF THE DATABASE
# $2 : USERID
# $3 : USERNAME
# $4 : CONCURRENT REQUEST ID
echo "_________________"
echo "Parameters received from concurrent program .."
echo " Time : "`date`
echo "_________________"
echo "Arguments : "
echo "user_name=$1"
echo "_________________"
echo " Logging to "

APPS_USER_PASS=$1

# Note the EOF must be placed after << and as First three char showing eod of file signal
# It can be any char or phrase acceptable for shell programming

sqlplus -s $APPS_USER_PASS <<EOF
select sysdate from dual;
EOF
if [ $? -ne 0 ]
# the $? will contain the result of previously executed statement.
#It will be 0 if success and 1 if fail in many cases
# -ne represents not "equal to"
then
echo "Entered Exception"
exit 1
# exit 1 represents concurrent program status. 1 for error, 2 for warning 0 for success
else
echo "File Successfully copied from source to destination"
exit 0
fi
# =========================================================

Second Method does not use Symbolic Link.

#!/bin/sh
#Note: If you see # in front of any line it means that its a comment line not the actual code
# =========================================================
# Script Name : SHELLDEMO.prog
# Developed by Jay
# =========================================================
echo "starting file"
old_args=$1
echo "old_args=$old_args"

APPS_USER_PASS=`echo $1 ‘ cut -d" " -f3 ‘ sed ’s/FCP_LOGIN=//g’ ‘ sed ‘s/"//g’`

# Note the EOF must be placed after << and as First three char showing eod of file signal
# It can be any char or phrase acceptable for shell programming

sqlplus -s $APPS_USER_PASS <<EOF
select sysdate from dual;
EOF
if [ $? -ne 0 ]
# the $? will contain the result of previously executed statement.
#It will be 0 if success and 1 if fail in many cases
# -ne represents not "equal to"
then
echo "
Entered Exception"
exit 1
# exit 1 represents concurrent program status. 1 for error, 2 for warning 0 for success
else
echo "
File Successfully copied from source to destination"
exit 0
fi
# =========================================================

Categories : 11i Scripts, Oracle Applications, Scripts Oracle, Scripts Unix Tags : , ,

Comments
December 9, 2009

Hi, Thanks for your efforts on this plugin. I wanted to let you know about my experience with it. This is with WP 2.8 importing a blogger blog with many images.

Posted by chinaphone
May 11, 2011

Hey im new here.

Im sam, how is everyone?

I look forwards to being a active memeber

Posted by TLSubmit
August 19, 2011

Hey there

Posted by feathemut
September 7, 2011

there are many ideas a man can think but if he thinks it twice he thought about another idea which makes his idea nonsense…

Posted by artyiom
September 7, 2011

how many time i do not do what i want to do but do what i dont want to do

Posted by intooosl
Leave a comment

(required)

(required)