Using The Data Stack; Passing Information Between A Routine And The Main Exec - IBM TSO/E REXX User Manual

Table of Contents

Advertisement

Processing of the Data Stack
v Responses to commands
v Commands to be issued after the exec ends
v Information the EXECIO command reads from and writes to data sets when

Using the Data Stack

The data stack has some unique characteristics, such as:
v It can contain a virtually unlimited number of data items of virtually unlimited size.
v It can contain commands to be issued after the exec ends.
v It can pass information between REXX execs and other types of programs in a
Because of the data stack's unique characteristics, you can use the data stack
specifically to:
v Store a large number of data items for a single exec's use.
v Pass a large number of arguments or an unknown number of arguments
v Pass responses to an interactive command that can run after the exec ends.
v Store data items from an input data set, which were read by the EXECIO
v Share information between an exec and any program running in MVS. For more
v Execute subcommands of a TSO/E command issued from a REXX exec.

Passing Information Between a Routine and the Main Exec

You can use the data stack to pass information from an exec to an external routine
without using arguments. The exec pushes or queues the information on the stack
and the routine pulls it off and uses it as in the following example.
140
z/OS V1R1.0 TSO/E REXX User's Guide
Note: To prevent the language processor from searching the data stack, you can
issue the PARSE EXTERNAL instruction instead of PULL. PARSE
EXTERNAL gets input directly from the terminal and bypasses the data
stack.
A TSO/E interactive command (such as LISTDS, TRANSMIT, and ALLOCATE)
can prompt a terminal user for information. Similarly, user responses can be put
on the data stack by an exec for the command's use.
When an exec ends, all elements remaining on the data stack are processed
before the READY mode message is displayed. These remaining elements are
treated as TSO/E commands to be issued. If the element is not a TSO/E
command (or an implicit exec or CLIST to be run), you see the message:
COMMAND command_name NOT FOUND
performing I/O.
For information about the EXECIO command and how it uses the data stack, see
"Using EXECIO to Process Information to and from Data Sets" on page 154.
TSO/E or non-TSO/E address space.
between a routine (subroutine or function) and the main exec.
command. For information about the EXECIO command, see "Using EXECIO to
Process Information to and from Data Sets" on page 154.
information about running REXX execs in MVS, see "Chapter 13. Using REXX in
TSO/E and Other MVS Address Spaces" on page 171.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents