Hi Marinko It depends on whether you are executing a TCL command or a Query within the EXECUTE statement.
For a TCL command, if the RETURNING or SETTING variable returns 0 then I believe the command was successful, if however -1 is returned, the command did fail. However, if you are performing a SELECT query within the EXECUTE statement, the RETURNING or SETTING variable has a different purpose and returns the number of records selected. If you want to, instead of creating a RETURNING variable, you can access @SYSTEM.RETURN.CODE directly depending on your needs. However, I suspect the reason this doesn't appear in the documentation is that possibly the documentation authors expected developers to use RETURNING or SETTING rather than @SYSTEM.RETURN.CODE directly..... Hope that helps! Regards Glenn Sallis -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Babic Marinko Sent: Donnerstag, 10. Dezember 2009 15:25 To: u2-users@listserver.u2ug.org Subject: [U2] SYSTEM.RETURN.CODE EXECUTE commands [CAPTURING variable] [PASSLIST [dynamic.array] ] [RTNLIST [variable] ] [ {SETTING | RETURNING} variable] Using the SETTING or RETURNING clause causes the @SYSTEM.RETURN.CODE of the last executed command to be placed in variable. Does that mean, that if the value of the RETURNING variable is not equal to 0, the EXECUTE command failed? Where are the @SYSTEM.RETURN.CODES documented or are these always os specific? Actually I have a value 0f 1478 on a AIX machine. Kind regards, Marinko _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users Legal Disclaimer: The information contained in this message may be privileged and confidential. It is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete or destroy any copy of this message _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users