
Example of using NEWSTACK with an Interactive Command
EXEC1
PUSH prompt1
PUSH prompt2
CALL sub1
..
.
EXIT
SUB1:
'NEWSTACK'
'ALLOCATE'
..
.
Note:
To have an interactive command prompt the user for input from the terminal,
run an exec explicitly with the EXEC command and specify
prompt
or include
the PROMPT(on) function within the exec. For more information, see
“Causing Interactive Commands to Prompt the User” on page 100.
Deleting a Private Stack with the DELSTACK Command
When an exec wants to delete the new stack and remove all elements placed on
the new stack, it can issue the TSO/E REXX DELSTACK command. The
DELSTACK command removes the most recently created data stack. If no stack
was previously created with the NEWSTACK command, DELSTACK
removes all
the elements from the original stack.
Finding the Number of Stacks
To find out how many stacks exist, use the TSO/E REXX QSTACK command.
QSTACK returns in the REXX special variable RC, the total number of stacks
including the original data stack.
'NEWSTACK'
..
.
'NEWSTACK'
..
.
'QSTACK'
SAY 'The number of stacks is' RC
/* RC contains 3 */
QSTACK returns the total number of stacks, not just the ones created for a single
exec. Thus if an exec issued two NEWSTACK commands and called a routine that
issued two more, when the routine issues a QSTACK command, RC returns the
total number of stacks, which is five.
For more information about these commands, see
.
Protecting Elements in the Data Stack
Chapter 11. Storing Information in the Data Stack
149
Содержание 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: ......