
Interpreting Error Messages
When you run an exec that contains an error, an error message often displays the
line on which the error occurred and gives an explanation of the error. Error
messages can result from syntax errors and from computational errors. For
example, the following exec has a syntax error.
Example of an Exec with a Syntax Error
/************************** REXX ***********************************/
/* This is an interactive REXX exec that asks the user for a
*/
/* name and then greets the user with the name supplied. It
*/
/* contains a deliberate error.
*/
/*******************************************************************/
SAY "Hello! What's your name?"
PULL who
/* Get the person's name.
IFwho = '' THEN
SAY 'Hello stranger'
ELSE
SAY 'Hello' who
When the exec runs, you see the following on your screen:
Hello! What's your name?
7 +++ PULL who
/* Get the person's name.IFwho =
'' THEN SAY 'Hello stranger'ELSE
SAY 'Hello' who
IRX0006I Error running REXX.EXEC(HELLO), line 7: Unmatched "/*" or quote
***
The exec runs until it detects the error, a missing */ at the end of the comment. As
a result, the SAY instruction displays the question, but doesn’t wait for your
response because the next line of the exec contains the syntax error. The exec
ends and the language processor displays error messages.
The first error message begins with the line number of the statement where the
error was detected, followed by three pluses
(+++)
and the contents of the
statement.
7 +++ PULL who
/* Get the person's name.IFwho =
'' THEN SAY 'Hello stranger'ELSE
SAY 'Hello' who
The second error message begins with the message number followed by a
message containing the exec name, line where the error was found, and an
explanation of the error.
IRX0006I Error running REXX.EXEC(HELLO), line 7: Unmatched "/*" or quote
For more information about the error, you can go to the message explanations in
, where information is arranged by message number.
To fix the syntax error in this exec, add
*/
to the end of the comment on line 7.
PULL who
/* Get the person's name.
*/
Interpreting Error Messages
Chapter 2. Writing and Running a REXX Exec
19
Summary of Contents for TSO/E REXX
Page 1: ...z OS TSO E REXX User s Guide SA22 7791 00 ...
Page 2: ......
Page 3: ...z OS TSO E REXX User s Guide SA22 7791 00 ...
Page 10: ...viii z OS V1R1 0 TSO E REXX User s Guide ...
Page 12: ...x z OS V1R1 0 TSO E REXX User s Guide ...
Page 14: ...xii z OS V1R1 0 TSO E REXX User s Guide ...
Page 18: ...xvi z OS V1R1 0 TSO E REXX User s Guide ...
Page 20: ...2 z OS V1R1 0 TSO E REXX User s Guide ...
Page 58: ...Tracing Expressions with the TRACE Instruction 40 z OS V1R1 0 TSO E REXX User s Guide ...
Page 78: ...60 z OS V1R1 0 TSO E REXX User s Guide ...
Page 86: ...Built In Functions 68 z OS V1R1 0 TSO E REXX User s Guide ...
Page 128: ...Issuing Other Types of Commands from an Exec 110 z OS V1R1 0 TSO E REXX User s Guide ...
Page 136: ...Debugging Execs 118 z OS V1R1 0 TSO E REXX User s Guide ...
Page 170: ...Protecting Elements in the Data Stack 152 z OS V1R1 0 TSO E REXX User s Guide ...
Page 201: ...Part 3 Appendixes Copyright IBM Corp 1988 2001 183 ...
Page 202: ...184 z OS V1R1 0 TSO E REXX User s Guide ...
Page 222: ...Using Variables 204 z OS V1R1 0 TSO E REXX User s Guide ...
Page 226: ...208 z OS V1R1 0 TSO E REXX User s Guide ...
Page 238: ...220 z OS V1R1 0 TSO E REXX User s Guide ...
Page 241: ......