Oracle Applications Steps To Register Shell Script As A Concurrent Program
- Oracle Applications – How to register Forms or Reports?
- Unix / Linux Secure Copy (SCP) usage and syntax
- How do you Create soft link with ln command in Linux / UNIX?
- Simple K-shell (Linux,UNIX) program to monitor concurrent programs and provide feedback.
- Oracle Applications: The Concurrent Jobs Ran Yesterday and Failed – SQL script & Unix Shell Script
There are two methods to handle, one with symbolic link another without symbolic link.
step 1: Place the
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.
#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.
#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
# =========================================================

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.
Hey im new here.
Im sam, how is everyone?
I look forwards to being a active memeber
Hey there
there are many ideas a man can think but if he thinks it twice he thought about another idea which makes his idea nonsense…
how many time i do not do what i want to do but do what i dont want to do