long as there is output. Output from the most recent command is placed after the
previous command’s output. The total number of lines trapped is stored in var0.
x = OUTTRAP('var')
"LISTC"
SAY 'The number of lines trapped is' var0
To limit the number of lines of output saved, you can specify a limit, for example 5,
after the variable name.
x = OUTTRAP('var',5)
This results in up to 5 lines of command output stored in var1, var2, var3, var4,
var5; and var0 contains the number 5. Subsequent lines of command output are not
saved.
The following example traps output from two commands and then displays the
member names from a partitioned data set named MYNEW.EXEC. The stem
variable includes a period, which causes the lines of output to be stored in a series
of compound variables. For more information about compound variables, see “Using
Compound Variables and Stems” on page 85.
x = OUTTRAP('var.')
"LISTC"
SAY 'The number of lines trapped is' var.0
/* could display 205 */
lines = var.0 + 1
"LISTDS mynew.exec MEMBERS"
SAY 'The number of lines trapped is' var.0
/* could display 210 */
DO i = lines TO var.0
SAY var.i
/* displays 5 members */
END
To turn trapping off, reissue the OUTTRAP function with the word "OFF".
x = OUTTRAP('OFF')
/* turns trapping OFF */
The OUTTRAP function can be used only in REXX execs that run in the TSO/E
address space.
The OUTTRAP function does not trap all lines of command output from all TSO/E
commands. For more information, see
Using the PROMPT Function
When your profile allows for prompting, the PROMPT function can set the
prompting option on or off for interactive TSO/E commands, or it can return the type
of prompting previously set. When prompting is on, execs can issue TSO/E
commands that prompt the user for missing operands.
The PROMPT function can be used only in REXX execs that run in the TSO/E
address space.
To set the prompting option on, use the PROMPT function followed by the word
"ON" enclosed within parentheses.
x = PROMPT('ON')
/* x is set to the previous setting of prompt */
/*
and sets the current setting to ON
*/
To set prompting off, substitute the word "OFF" for "ON".
To find out if prompting is available for TSO/E interactive commands, use the
PROMPT function followed by empty parentheses.
TSO/E External Functions
124
z/OS V1R1.0 TSO/E REXX User’s Guide
Содержание 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: ......