Capturing return codes from Sybase stored procedure in korn shell script -
I am facing a problem in capturing the return code of a stored procedure. I am calling a Sibas memory processing in my kernel shell script which is used below as an IQL statement.
isql -U $ {APPLID} -S {SERVER} & gt; $ {SqlMsg} & lt; & Lt; Use EOF $ $ {DATABASE} to exec exec_procedure go EOF returncode = $?
If an error occurs within the stored procedure, then I am not able to follow the method below.
If I tried to print [$ returncode-0] then "failed" fi
I have stored functions like return (1) Tried to use the return statement inside
but this does not give me the results of the hope when I resonate the return code, it counts as 0, even so Even after returning the position 1. 1 was seen in the SQL log in the return position.
To capture the error within your SQL statement, you get the @@ error
returncode = 'isql -U will need to be seen $ {APPLID} -S {SERVER} & gt; $ {SqlMsg} & lt; & Lt; Use EOF $ {DATABASE} to exec exec_proclave go go @@ choose error error EOF`
This should allow you to work in the situation of your situation.
Comments
Post a Comment