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 #165 background imageLoading...
Page #165 background image
'DROPBUF 2'
'QBUF'
SAY RC
'QELEM'
SAY RC
SAY QUEUED()
ANSWERS
1.
a. C
b. b
c. B (b was changed to uppercase because it was queued without quotes and
pulled without PARSE.)
d. 2
e. 1
f. 0
2.
a. 4
b. 3
c. 0
d. 1, 1, 1
Protecting Elements in the Data Stack
In certain environments, particularly MVS, where multiple tasks run at the same
time, it is often important for an exec to isolate stack elements from other execs.
Similarly, an exec in TSO/E might want to protect stack elements from a routine
(subroutine or function) that it calls. For example, if an exec puts elements on the
data stack for its own use and then calls a subroutine that issues an interactive
TSO/E command, such as ALLOCATE, the command goes to the data stack first for
input to the command. Because the stack input is incorrect for the command
prompt, the exec ends in error.
Example of an Interactive Command Error
EXEC1
PUSH prompt1
PUSH prompt2
CALL sub1
7invellip.
EXIT
SUB1:
'MAKEBUF'
'ALLOCATE'
.
.
.
Even though the subroutine in the preceding example starts with the MAKEBUF
command, the stack elements will be used because MAKEBUF does not protect
elements previously placed on the stack.
Creating a Buffer on the Data Stack
Chapter 11. Storing Information in the Data Stack 147

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