Terry Gauchat wrote:
>
> As to an earlier post regarding return codes from system calls within
> Stored Procedures...
>
> The best you can do is get the "return" value from the called script/program.
> I wrote a cover script to the Expect program which generates
> meaningful return codes
> (i.e., bad userid, bad old password, bad new password, failed call to
> passwd, etc.), based
> on return codes in the Expect script (and so on; layered).
>
> The stored procedure, in turn, passes these codes back to the calling
> client, so that the client knows what happened.
>
> Works fine.
>
> ...Terry R. Gauchat
> Systems Consultant.
> tgauch@aol.com
> tgauch@msn.com
> tgauchat@iia.org
My early post about the return codes from the system command is based
upon the following senario:
called script/C executes "exit -1"
calling stored procedure shows sqlcode: -668, isam code -255
That is why we were confused.
Thanks for your comments above. I went back to check our code and found
that "exit" should return POSITIVE number. Although isam code is always
negative, at least the absolute value is correct. Since this approach
works, we implemented "expect," and it is working effectively today with
our unique requirement: NIS+ for single account and single password.
Chao Din