Operating System - Linux
1827876 Members
1561 Online
109969 Solutions
New Discussion

Re: Some error in Bourne shell script

 
SOLVED
Go to solution
Avinash Byalihal
New Member

Some error in Bourne shell script




Hi All

I am new to this bourne shell script.When i try to call oracle stored procedure as command line arguments it is giving some error
= = = = = = = = = = = = = = = = = = = = = = =

POSITION','20060605','Avinash','xyx.csv','Y','Y',200 ();
*
ERROR at line 2:
ORA-06550: line 2, column 11:
PLS-00103: Encountered the symbol "," when expecting one of the following:
:= . ( @ % ;
ORA-06550: line 2, column 55:
PLS-00103: Encountered the symbol "(" when expecting one of the following:
) ,


= = = = = = = = = = = = = = = = = = = = = = =


#!/bin/sh
# File input_file_audit.sh
echo "Before Calling the Function "


. common_functions.sh

input_file_audit()
{
echo "in Function Befoire Calling Common Function File"
DATA_TYPE=$1
SNAPSHOT_DATE=$2
SOURCE_SYSTEM_ID=$3
POSITION_DATA_FILE=$4
HEADER_VALIDATE=$5
TRAILER_VALIDATE=$6
TOTAL_RECORDS=$7



echo "Testing to Connect to the DataBase"

Test_db_connect

sqp $LOG_FILE P_INPUT_FILE_AUDIT "'$DATA_TYPE','$SNAPSHOT_DATE','$SOURCE_SYSTE
M_ID','$POSITION_DATA_FILE','$HEADER_VALIDATE','$TRAILER_VALIDATE',$TOTAL_RECORD
S"

if [ $? -eq 0 ]
then
echo "Procedure P_INPUT_FILE_AUDIT completed successfully" | tee -a $JOB_LOG_F
ILE
else
echo "Procedure P_INPUT_FILE_AUDIT failed to complete" | tee -a $JOB_LOG_FIL
E
fi

}

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
#! /bin/sh
# File common_function.sh

### Function to Check Oracle Database Connectivity
#Takes no input Parameters

Test_db_connect()
{
sqlplus -s <
2 REPLIES 2
Peter Godron
Honored Contributor
Solution

Re: Some error in Bourne shell script

Hi,
can I suggest you insert a debug statement into the sqp function, just before the sqlplus step to show exactly what is in $args.
If this is ok, replace the $proc ($args) call with the actual code of the procedure.

Other people had similar problems, but never bother to report back:
http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=1026139
Bill Hassell
Honored Contributor

Re: Some error in Bourne shell script

And just to clarify, the #!/bin/sh line is actually running HP's POSIX shell, a superset of the Korn shell. Also, /bin is only found in older SysV Unix systems and BSD systems like Linux. On HP-UX (and Solaris and other modern SysV's) the directoru is really /usr/bin. /bin in HP-UX is not a directory at all but a temporary transition link.


Bill Hassell, sysadmin