
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
Содержание TSO/E REXX
Страница 1: ...z OS TSO E REXX User s Guide SA22 7791 00 ...
Страница 2: ......
Страница 3: ...z OS TSO E REXX User s Guide SA22 7791 00 ...
Страница 10: ...viii z OS V1R1 0 TSO E REXX User s Guide ...
Страница 12: ...x z OS V1R1 0 TSO E REXX User s Guide ...
Страница 14: ...xii z OS V1R1 0 TSO E REXX User s Guide ...
Страница 18: ...xvi z OS V1R1 0 TSO E REXX User s Guide ...
Страница 20: ...2 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 58: ...Tracing Expressions with the TRACE Instruction 40 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 78: ...60 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 86: ...Built In Functions 68 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 128: ...Issuing Other Types of Commands from an Exec 110 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 136: ...Debugging Execs 118 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 170: ...Protecting Elements in the Data Stack 152 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 201: ...Part 3 Appendixes Copyright IBM Corp 1988 2001 183 ...
Страница 202: ...184 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 222: ...Using Variables 204 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 226: ...208 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 238: ...220 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 241: ......