Possible Solution 3
/******************************** REXX *****************************/
/* This exec uses the PUSH and QUEUE instructions to put T,S,O,E
*/
/* on the data stack.
*/
/*******************************************************************/
PUSH 'S'
/***************************/
QUEUE 'O'
/* Data in stack is:
*/
PUSH 'T'
/*
(second push)
T */
QUEUE 'E'
/*
(first push)
S */
/*
(first queue)
O */
DO QUEUED()
/*
(second queue)
E */
PULL stackitem
/***************************/
SAY stackitem
END
Processing of the Data Stack
You can think of a data stack as a temporary holding place for information. Every
TSO/E REXX user has a separate data stack available for each REXX environment
that is initialized. REXX environments are initialized at the READY prompt, when
you enter ISPF, and again when you split the screen in ISPF.
When an exec issues a PULL instruction, and when it issues an interactive TSO/E
command, the data stack is searched first for information and if that is empty,
information is retrieved from the terminal.
Some types of input that can be stored on the data stack are:
v
Data for the PULL and PARSE PULL instructions
When an exec issues a PULL instruction, the language processor first goes to
the data stack and pulls off the top element. If the data stack is empty, the
language processor goes to the terminal for input. When the data stack is empty,
the PULL instruction can be used with the SAY instruction to interact with a user
at the terminal.
Manipulating the Data Stack
Chapter 11. Storing Information in the Data Stack
139
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: ......