EasyManuals Logo

IBM TSO/E REXX User Manual

IBM TSO/E REXX
242 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #157 background imageLoading...
Page #157 background image
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

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM TSO/E REXX and is the answer not in the manual?

IBM TSO/E REXX Specifications

General IconGeneral
BrandIBM
ModelTSO/E REXX
CategoryComputer Hardware
LanguageEnglish

Related product manuals