Processing Of The Data Stack - IBM TSO/E REXX User Manual

Table of Contents

Advertisement

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
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'
PUSH 'T'
QUEUE 'E'
DO QUEUED()
PULL stackitem
SAY stackitem
END
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
/***************************/
/* Data in stack is:
/*
(second push)
/*
(first push)
/*
(first queue)
/*
(second queue)
/***************************/
Chapter 11. Storing Information in the Data Stack
*/
*/
*/
T */
S */
O */
E */
139

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents