0% found this document useful (0 votes)
76 views

Implementing A Host Concurrent Request APPENDIX 3: Sample Host Program (UNIX)

This document provides a sample UNIX shell script that verifies the parameters passed to a host program. The script defines an output directory and uses a loop to echo each parameter to the directory, identifying it by number. It handles up to 10 parameters, shifting the values to test additional parameters beyond the first 10. The script exits after writing start and end messages to the output directory.

Uploaded by

sivakrishna
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views

Implementing A Host Concurrent Request APPENDIX 3: Sample Host Program (UNIX)

This document provides a sample UNIX shell script that verifies the parameters passed to a host program. The script defines an output directory and uses a loop to echo each parameter to the directory, identifying it by number. It handles up to 10 parameters, shifting the values to test additional parameters beyond the first 10. The script exits after writing start and end messages to the output directory.

Uploaded by

sivakrishna
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Author – A.

Kishore
http://appsdba.info

Implementing a Host Concurrent Request

APPENDIX 3: Sample Host Program (UNIX)


#!/usr/bin/ksh
# test shell script to verify what parms are passed

OUTDIR=$APPLCSF/$APPLOUT/$3.$4

echo "BEGIN: `date`" >> $OUTDIR


if [ $# = 0 ]
then
echo "No parms were passed to the Shell Program" >> $OUTDIR
exit
fi
counter=0
while [ "$counter" -le $# ]
do
echo "Passed Parm $counter : \c" >> $OUTDIR
case "$counter" in
0) echo "$0" >> $OUTDIR
;;
1) echo "$1" >> $OUTDIR
;;
2) echo "$2" >> $OUTDIR
;;
3) echo "$3" >> $OUTDIR
;;
4) echo "$4" >> $OUTDIR
;;
5) echo "$5" >> $OUTDIR
;;
6) echo "$6" >> $OUTDIR
;;
7) echo "$7" >> $OUTDIR
;;
8) echo "$8" >> $OUTDIR
;;
9) echo "$9" >> $OUTDIR
;;
10) shift
echo "$9" >> $OUTDIR
;;
*) echo "Not parm 0 thru 10" >> $OUTDIR
;;
esac
counter=`expr $counter + 1`
done
echo "END: `date`" >> $OUTDIR
exit
Author – A.Kishore
http://appsdba.info

cd $FND_TOP/bin
cat IKON_TEST.prog
date

ln -s fndcpesr IKON_TEST

chmod 755 IKON_TEST.prog

To execute from command prompt

IKON_TEST IKON_TEST.prog
Author – A.Kishore
http://appsdba.info
Author – A.Kishore
http://appsdba.info

You might also like