EasyManuals Logo

IBM TSO/E REXX User Manual

IBM TSO/E REXX
242 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #131 background imageLoading...
Page #131 background image
The RC variable can be especially useful in an IF instruction to determine which
path an exec should take.
'ALLOC DA('dsname') F(SYSPROC) SHR REUSE'
IF RC \= 0 THEN
CALL error1
ELSE NOP
Note: The value of RC is set by every command and might not remain the same
for the duration of an exec. When using RC, make sure it contains the return
code of the command you want to test.
SIGL
The SIGL special variable is used in connection with a transfer of control within an
exec because of a function, or a SIGNAL or CALL instruction. When the language
processor transfers control to another routine or another part of the exec, it sets the
SIGL special variable to the line number from which the transfer occurred.
000001 /* REXX */
.
.
.
000005 CALL routine
.
.
.
000008
000009 routine:
000010 SAY 'We came here from line' SIGL /* SIGL is set to 3 */
000011 RETURN
If the called routine itself calls another routine, SIGL is reset to the line number from
which the most recent transfer occurred.
SIGL and the SIGNAL ON ERROR instruction can help determine what command
caused an error and what the error was. When SIGNAL ON ERROR is included in
an exec, any host command that returns a nonzero return code causes a transfer of
control to a routine named "error". The error routine runs regardless of other actions
that would normally take place, such as the display of error messages.
000001 /* REXX */
000002 SIGNAL ON ERROR
000003 "ALLOC DA(new.data) LIKE(old.data)"
.
.
.
000008 "LISTDS ?"
.
.
.
000011 EXIT
000012
000013 ERROR:
000014 SAY 'The return code from the command on line' SIGL 'is' RC
000015 /* Displays:
000016 The return code from the command on line 5 is 12 */
For more information about the SIGNAL instruction, see z/OS TSO/E REXX
Reference.
Tracing with the Interactive Debug Facility
The interactive debug facility permits a user to interactively control the execution of
an exec. A user can view the tracing of various types of instructions separated by
pauses as the exec runs. During a pause, a user can continue to the next traced
instruction, insert instructions, re-execute the previous instruction, and change or
terminate interactive tracing.
Debugging Execs
Chapter 9. Diagnosing Problems Within an Exec 113

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM TSO/E REXX and is the answer not in the manual?

IBM TSO/E REXX Specifications

General IconGeneral
BrandIBM
ModelTSO/E REXX
CategoryComputer Hardware
LanguageEnglish

Related product manuals