Unanswered: When using "exit sqlcode", OpenVMS $status doesn't seem to mean anything.
When my SQL script terminates and returns control to the operating system, the value of $status seems to have no relation to the value of SQLCODE. For example, for a SQL script which I know should raise the NO_DATA_FOUND condition, resulting in a SQLCODE value of -1403,
the integer value of $status when the SQL script terminates is as shown:
ROGERS$ show sym $status
$STATUS == "%X10000002"
ROGERS$ show sym x
X == 268435458 Hex = 10000002 Octal = 02000000002
I tried looking for a constant offset, but there doesn't seem to be any. Another SQL script which I know should terminate successfully returns a $status of 1.