When execution inadvertently flows into a procedure that lacks a procedure instruction an unexpected procedure WILL NOT be raised. What is the name of these creatures in Harry Potter and the Deathly Hallows? share|improve this answer answered Nov 30 '10 at 15:59 Deuian 700512 add a comment| up vote 0 down vote If you want to set the return value of your method you IDUG is offering up to 80% off when you both come to the conference! _____________________________________________________________________ If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's Listserv Todd Burch Re:
If no abend occurs, then RC is set to the decimal value of the return code returned by the command. The value set by VALUE function could not be retrieved by batch command. Thanks If you would like to refer to this comment somewhere else in this project, copy and paste the following link: Rick McGuire - 2009-10-13 Just specify the value on the Maybe you need to provide more detail in your question like what type of Rexx it is (Classic or OO) and what environment you are using.
SourceForge About Site Status @sfnet_ops Powered by Apache Allura™ Find and Develop Software Create a Project Software Directory Top Downloaded Projects Community Blog @sourceforge Resources Help Site Documentation Support Request © Kilowatt Software L.L.C. -- Classic Rexx Tutorial -- Back to top Click here if you have any comments or questions regarding this tutorial Last updated on: 11 Apr 2006 REXXTRY: Best regards Mariusz Stakowski _____________________________________________________________________ * IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA * * Your only source for independent, unbiased, and trusted DB2 information. *
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/topic/com.ibm.db29.doc.comref/db2z_cmd_dsn.htm I would suggest one command at time. Where can I report criminal intent found on the dark web? IDUG is offering up to 80% off when you both come to the conference! _____________________________________________________________________ If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2- L is the home of IDUG's Listserv _____________________________________________________________________ * For a user abend, RC is set to the decimal value of the abend code.
q1 = " RUN PROGRAM("pgmname") PLAN("planname") " q2 = " PARM('"parm_txt"')" queue (q1)(q2) queue " END " "DSN SYSTEM(DB2X)" ret_codes.pgm.i=pgmname ret_codes.plan.i=planname ret_codes.retcode.i=RC 'DELSTACK' end The above solution is bad from performance Please don't fill out this field. This value is assigned to the special RESULT variable, if the procedure was invoked by a call instruction. No, thanks
Rexx Return Code
Rexx includes the following instructions for trapping and controlling system errors:CALL ON ERRORCALL ON FAILURESIGNAL ON ERRORSIGNAL ON FAILURE
Once it returns to the batch file, the RC value is available in the %ERRORLEVEL% variable. All Rights Reserved. This restriction is imposed by the method ISPF uses to handle variables in the compiled REXX environment. This problem is generally corrected by preceding the label(s) of the procedure with a return or exit instruction.
For More Information Visit the REXX page here for more sources of REXX info. In the next example, an error message is displayed when the TYPE command returns a nonzero value in RC:/* Simple if/then error handler */ say "Type a file name:" For REXX services provided by IBM or other software vendors, refer to the product documentation for more information on how to interpret these return codes. I don't know how to take over return codes of all running programs (but the last).
Unix System Services For the SYSCALL environment (callable services): -3 usually means that syscalls('ON') has not been issued or did not succeed -20 indicates that the command was not recognized -2n
Open-rexx?0How to parse variable in REXX/Regina0Dealing with PULL in REXX0Rexx, Parse a file for a single line0Can't figure out data type of character in REXX0How to copy stem value to simple In particular, in a CLIST or in batch TSO/E: in a CLIST, to execute a one-line REXX exec as a sub-routine. Is it a security vulnerability if the addresses of university students are exposed? Pi == 3.2 Is there any way to take stable Long exposure photos without using Tripod? rexx share|improve this question asked Nov 30 '10 at 12:16 Partha 62 add a comment| 2 Answers 2 active oldest votes up vote 2 down vote /* REXX */ "LISTDS ?"
You seem to have CSS turned off. The REXX exec, which can be a single REXX instruction or multiple instructions separated by semi-colons, must be specified as an argument in the REXXTRY command, for example: REXXTRY a='A'; b='B'; q1 = " RUN PROGRAM("pgmname") PLAN("planname") " q2 = " PARM('"parm_txt"')" queue (q1)(q2) queue " END " "DSN SYSTEM(DB2X)" ret_codes.pgm.i=pgmname ret_codes.plan.i=planname ret_codes.retcode.i=RC 'DELSTACK' end The above solution is bad from performance If the return instruction does not have an associated value, the RESULT variable is dropped instead.
This can lead to a variety of unexpected consequences. The value of valueExpression is optionally returned to the calling context. If the topmost program in this source file was an external procedure, then processing continues with the instruction that called the external procedure as a subroutine or function. asked 6 years ago viewed 1561 times active 4 years ago Related 0How do I display a table to an ISPF panel with Rexx then retrieve back updated user input?1Anyone know
Examples Invocation in a CLIST SET string = ABC DEF GHI JKL REXXTRY xxx="&string"; + n=WORDS(xxx); + RETURN WORD(xxx,n) WRITE LASTCC=&LASTCC RESULT=&RESULT Invocation in a CLIST - CLIST starts with PROC, However, specifying LANG(CREX) prevents REXXTRY from storing the data returned by the REXX exec into &RESULT. If something goes wrong, the return code issued is a nonzero number. in a batch TSO/E job step, in which case the REXX code is not specified as an argument to the command, but consists in all the input lines present after the
REXX, DSN RUN return code February 9, 2011 08:18 AM Hello, I have a Rexx script where I run DB2 applications by DSN+CALL commands: ret_codes.='' do i=1 to .... ..... Please don't fill out this field. The value of valueExpression is optionally returned to the calling context. When this type of procedure is initially created you are strongly advised to precede the associated label(s) with an return or exit instruction.
Return instruction return [ valueExpression ] The return instruction concludes the processing of the current procedure. All Rights Reserved. In batch, you can have some control over this when calling DSN under IKJEFT1A instead of IKJEFT01, but it is still nowhere close to ideal. Without some provision to stop the program, in this case a trap, Rexx continues running.