0403-057 Syntax error at line : `}' is not expected.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting 0403-057 Syntax error at line : `}' is not expected.
# 1  
Old 12-24-2012
0403-057 Syntax error at line : `}' is not expected.

i dont know where m i mistaking.. please help me out with this issue Smilie

thanks in advanceSmilie

Code:
one_main()
{
a=100
while [ $a -ne 0 ];
do
clear
echo "##############################################"
echo ":: CURRENTLY YOU ARE IN RC AND OC MARKING   ::"
echo "##############################################"

RC.sh $1 $2 $3 $4 $5 $6 &
OC.sh $1 $2 $3 $4 $5 $6
cd /petaf01/afdata50/velbla3/var/vel/log
file_RC=`ls|grep RC_MARK_B2B_EXPLAINABLE_$4 |tail -1`
files_OC=`ls|grep OC_B2B_EXPLAINABLE_$4 |tail -1`
ERR1=`grep ORA- $files_RC | wc -l`
ERR2=`grep ORA- $files_OC | wc -l`

if [ $ERR1 -eq 0 ];
then
echo "MARKING OF RC TABLES ARE DONE SUCCESSFULLY"
else
echo "MARKING OF RC TABLES WAS UNSUCCESSFUL $file_RC"

exit
fi

if [ $ERR2 -eq 0 ];
then
echo "MARKING OF OC TABLES ARE DONE SUCCESSFULLY"
else
echo "MARKING OF OC TABLES WAS UNSUCCESSFUL"
echo "MARKING OF RC TABLES WAS UNSUCCESSFUL $file_OC"
exit
fi

TAX.sh $1 $2 $3 $4 $5 $6
file_TAX=`ls|grep TAX_MARK_B2B_EXPLAINABLE_$4 |tail -1`
ERR3=`grep ORA- $file_TAX | wc -l`
if [ $ERR3 -eq 0 ];
then
echo "MARKING OF TAX TABLES ARE DONE SUCCESSFULLY"
else
echo "MARKING OF TAX TABLES WAS UNSUCCESSFUL"
echo "MARKING OF RC TABLES WAS UNSUCCESSFUL $file_TAX"
exit
fi

Discount.sh $1 $2 $3 $4 $5 $6
file_D=`ls|grep TAX_MARK_B2B_EXPLAINABLE_$4 |tail -1`
ERR4=`grep ORA- $file_D | wc -l`
if [ $ERR4 -eq 0 ];
then
echo "MARKING OF DISCOUNT TABLES ARE DONE SUCCESSFULLY"
else
echo "MARKING OF DISCOUNT TABLES WAS UNSUCCESSFUL"
echo "MARKING OF RC TABLES WAS UNSUCCESSFUL $file_D"
exit
fi

Prev_Bal.sh $1 $2 $3 $4 $5 $6
file_P=`ls|grep PREV_BAL_B2B_EXPLAINABLE_$4 |tail -1`
ERR5=`grep ORA- $file_P | wc -l`
if [ $ERR5 -eq 0 ];
then
echo "MARKING OF Prev_Balance TABLES ARE DONE SUCCESSFULLY"
else
echo "MARKING OF Prev_Balance TABLES WAS UNSUCCESSFUL"
echo "MARKING OF RC TABLES WAS UNSUCCESSFUL $file_P"
exit
fi

Net_Pk_Match_Only_Final.sh $1 $2 $3 $4 $5 $6
file_Net1=`ls|grep NET_PK_MATCH_ONLY_FINAL_$4 |tail -1`
ERR6=`grep ORA- $file_Net1 | wc -l`
if [ $ERR6 -eq 0 ];
then
echo "MARKING OF Net_Pk_Match_Only_Final TABLES ARE DONE SUCCESSFULLY"
else
echo "MARKING OF Net_Pk_Match_Only_Final TABLES WAS UNSUCCESSFUL"
echo "MARKING OF RC TABLES WAS UNSUCCESSFUL $file_Net1"
exit
fi

Net_Leg_Only_Final.sh $1 $2 $3 $4 $5 $6
file_Net2=`ls|grep NET_LEG_ONLY_FINAL_$4 |tail -1`
ERR7=`grep ORA- $file_Net2 | wc -l`
if [ $ERR7 -eq 0 ];
then
echo "MARKING OF Net_Leg_Only_Final TABLES ARE DONE SUCCESSFULLY"
else
echo "MARKING OF Net_Leg_Only_Final TABLES WAS UNSUCCESSFUL"
echo "MARKING OF RC TABLES WAS UNSUCCESSFUL $file_Net2"
exit
fi


Net_Enb_Only_Final.sh $1 $2 $3 $4 $5 $6
file_Net3=`ls|grep NET_ENB_ONLY_FINAL_$4 |tail -1`
ERR8=`grep ORA- $file_Net3 | wc -l`
if [ $ERR8 -eq 0 ];
then
echo "MARKING OF Net_Enb_Only_Final TABLES ARE DONE SUCCESSFULLY"
else
echo "MARKING OF Net_Enb_Only_Final TABLES WAS UNSUCCESSFUL"
echo "MARKING OF RC TABLES WAS UNSUCCESSFUL $file_Net3"
exit
fi

#####################DUE AMOUNT
Due_Enb_Only_Final.sh $1 $2 $3 $4 $5 $6
file_DUE1=`ls|grep DUE_ENB_ONLY_FINAL_$4 |tail -1`
ERR9=`grep ORA- $file_DUE1 | wc -l`
if [ $ERR9 -eq 0 ];
then
echo "MARKING OF Due_Enb_Only_Final TABLES ARE DONE SUCCESSFULLY"
else
echo "MARKING OF Due_Enb_Only_Final TABLES WAS UNSUCCESSFUL"
echo "MARKING OF RC TABLES WAS UNSUCCESSFUL $file_DUE1"
exit
fi

Due_Leg_Only_Final.sh $1 $2 $3 $4 $5 $6
file_DUE2=`ls|grep DUE_LEG_ONLY_FINAL_$4 |tail -1`
ERR7=`grep ORA- $file_DUE2 | wc -l`
if [ $ERR7 -eq 0 ];
then
echo "MARKING OF Due_Leg_Only_Final TABLES ARE DONE SUCCESSFULLY"
else
echo "MARKING OF Due_Leg_Only_Final TABLES WAS UNSUCCESSFUL"
echo "MARKING OF RC TABLES WAS UNSUCCESSFUL $file_DUE2"
exit
fi


Due_Pk_Match_Only_Final.sh $1 $2 $3 $4 $5 $6
file_DUE3=`ls|grep DUE_PK_MATCH_FINAL_$4 |tail -1`
ERR8=`grep ORA- $file_DUE3 | wc -l`
if [ $ERR8 -eq 0 ];
then
echo "MARKING OF Due_Pk_Match_Only_Final TABLES ARE DONE SUCCESSFULLY"
else
echo "MARKING OF Due_Pk_Match_Only_Final TABLES WAS UNSUCCESSFUL"
echo "MARKING OF RC TABLES WAS UNSUCCESSFUL $file_DUE3"
exit
fi
echo "ALL MARKING IS DONE SUCESSFULLY PLEASE REFER THE RESPECTIVE TABLES"


echo "##############################################"
echo ":: B2B MARKING   ::"
echo "##############################################"
echo "PLEASE NOT YOU HAVE TWO OPTIONS ONE FOR MARKING IT ONE BY ONE AND SECONDLY YOU CAN ALSO SELECT OPTION 12 TO MARK IT IN ONE GO"
echo "0.Exit"
echo "1.SELECT 1 TO MARK TABLES FOR RC"
echo "2.SELECT 2 TO MARK TABLES FOR OC"
echo "3.SELECT 3 TO MARK TABLES FOR TAX"
echo "4.SELECT 4 TO MARK TABLES FOR DISCOUNT"
echo "5.SELECT 5 TO MARK TABLES FOR Prev Balance"
echo "6.SELECT 6 TO MARK TABLES FOR Net_Pk_Match"
echo "7.SELECT 7 TO MARK TABLES FOR Net_Legacy "
echo "8.SELECT 8 TO MARK TABLES FOR Net_Enabler"
echo "9.SELECT 9 TO MARK TABLES FOR Due_Enabler"
echo "10.SELECT 10 TO MARK TABLES FOR Due_Legacy"
echo "11.SELECT 11 TO MARK TABLES FOR Due_Pk_Match"
echo "12.SELECT 12 TO MARK TABLES SEQUENTLY"
echo
echo "##############################################"
echo "Enter your choice: \c"
read U

        case $U in

                1) RC.sh $1 $2 $3 $4 $5 $6 & ; continue ;;
                2) OC.sh $1 $2 $3 $4 $5 $6 & ; continue ;;
                3) TAX.sh $1 $2 $3 $4 $5 $6 & ; continue  ;;
                4) Discount.sh $1 $2 $3 $4 $5 $6 & ; continue  ;;
                5) Prev_Bal.sh $1 $2 $3 $4 $5 $6 & ; continue  ;;
                6) Net_Pk_Match_Only_Final.sh $1 $2 $3 $4 $5 $6 & ; continue ;;
                7) Net_Leg_Only_Final.sh $1 $2 $3 $4 $5 $6 & ; continue ;;
                8) Net_Enb_Only_Final.sh $1 $2 $3 $4 $5 $6 & ; continue  ;;
                9) Due_Enb_Only_Final.sh $1 $2 $3 $4 $5 $6 & ; continue  ;;
                10) Due_Leg_Only_Final.sh $1 $2 $3 $4 $5 $6 & ; continue  ;;
                11) Due_Pk_Match_Only_Final.sh $1 $2 $3 $4 $5 $6 & ; continue  ;;
                12) one_main ;;
                0) exit ;;
                *) INVALID ;;
        esac
exit


Last edited by Scott; 12-24-2012 at 11:26 AM.. Reason: Removed attachment; added code here
# 2  
Old 12-24-2012
Hi.

Where is the closing } for the function one_main()?

There's also no "done" to match the "do" in your while-loop.

Did you post the entire code?

And these backticks (`) are unsightly, often hard to read, and not least deprecated. You should use $() instead.
This User Gave Thanks to Scott For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

0403-057 Syntax error at line 399 : `"' is not matched

Hi Everyone, I am getting strange behavior, same script runs fine without any error in one AIX machine, whereas on another it is throwing this error "0403-057 Syntax error at line 399 : `"' is not matched", I also ran the script in debug mode. This is the output, still doesn't say anything.... (2 Replies)
Discussion started by: sid1987
2 Replies

2. Shell Programming and Scripting

0403-057 Syntax error at line 17 : `(' is not expected.

Hi, While executing my code i am getting below Error: ./check_disk1: 0403-057 Syntax error at line 55 : `(' is not expected. My code is : #!/bin/ksh PROGNAME=`basename $0` STATE_OK=0 STATE_WARNING=1 STATE_CRITICAL=2 STATE_UNKNOWN=3 OS=$(uname) AWK="/usr/bin/awk"... (6 Replies)
Discussion started by: abodage
6 Replies

3. AIX

0403-057 Syntax error at line 17 : `(' is not expected.

Hi, I am new to shell scripting.i am trying to mail after my backup completed. Here is my shell script: if ; then egrep (ERROR|error|Error|RMAN-) ${/backup/RMANBKUP/spool/shelltest.log} > /dev/null if ; then RESULT_MSG=WARNING: Errors occurred during the ${ORACLE_SID} Rman... (3 Replies)
Discussion started by: faruqms
3 Replies

4. Shell Programming and Scripting

0403-057 Syntax error at line 169 : `"' is not matched.

Hi, I am getting this error in my attached shell script, kindly help as soon as possible: Thanks, Andre (2 Replies)
Discussion started by: damoon
2 Replies

5. Shell Programming and Scripting

0403-057 Syntax error

I am getting the error : rocfm/wls_subload/in/processed_files/tel_input_additional_checked_all_mandatory.txt: 0403-057 Syntax error at line 1 : `|' is not expected. >>>>ALL MANDATORY FIELDS CHECKING IS SUCCESSFUL count is 0 ... (3 Replies)
Discussion started by: princetd001
3 Replies

6. Shell Programming and Scripting

ksh: 0403-057 Syntax error: `done' is not expected.

Hi I am getting error 'ksh: 0403-057 Syntax error: `done' is not expected.' when running below script any one can provide inputs on this. ------------------------ if then echo "Report Name |Modification Date|Report File Size|Owner" >SOX_`date +'%Y%m%d'` while read line do... (2 Replies)
Discussion started by: karnatis
2 Replies

7. Shell Programming and Scripting

Receiving error: ./ang.ksh[35]: 0403-057 Syntax error at line 116 : `done' is not expected.

Hi All I am quite new to Unix. Following is a shell script that i have written and getting the subject mentioned error. #!/bin/ksh #------------------------------------------------------------------------- # File: ang_stdnld.ksh # # Desc: UNIX shell script to extract Store information.... (3 Replies)
Discussion started by: amitsinha
3 Replies

8. Shell Programming and Scripting

0403-057 Syntax error at line 52 : `)' is not expected.

Can someone please tell me wht is wrong with the following peice of code? I keep getting the following error - 0403-057 Syntax error at line 52 : `)' is not expected. case "${option_count}" in 1) java -Xms256m -Xmx1536m "${APPLNAME}" "${ACTION_TYPE}" > "${LOGFILE}" 2>... (2 Replies)
Discussion started by: Veenak15
2 Replies

9. Shell Programming and Scripting

get_source[34]: 0403-057 Syntax error at line 66 : `"' is not matched.

Hi, I am getting this error in my shell script, kindly help as soon as possible: ################################################################### # Main body of program ################################################################### . /saptech/scripts/common/declare # Defines... (1 Reply)
Discussion started by: vishal_ranjan
1 Replies

10. UNIX for Dummies Questions & Answers

0403-057 Syntax error at line 70. pls help

Hi All, I got a script from one of the unix forums for reporting on filesystem usage and wanted to use it but it keeps giving me the following error. 0403-057 Syntax error at line 70 The script is shown below. Pls help as I am new to UNIX. # set -x # D I S K S P A C E . S H # #... (2 Replies)
Discussion started by: OMONI
2 Replies
Login or Register to Ask a Question