Using the Data Stack

The data stack has some unique characteristics, such as:
  • It can contain a virtually unlimited number of data items of virtually unlimited size.
  • It can contain commands to be issued after the exec ends.
  • It can pass information between REXX execs and other types of programs in a TSO/E or non-TSO/E address space.
Because of the data stack's unique characteristics, you can use the data stack specifically to:
  • Store a large number of data items for a single exec's use.
  • Pass a large number of arguments or an unknown number of arguments between a routine (subroutine or function) and the main exec.
  • Pass responses to an interactive command that can run after the exec ends.
  • Store data items from an input data set, which were read by the EXECIO command. For information about the EXECIO command, see Using EXECIO to Process Information to and from Data Sets.
  • Share information between an exec and any program running in MVS™. For more information about running REXX execs in MVS, see Using REXX in TSO/E and Other MVS Address Spaces.
  • Execute subcommands of a TSO/E command issued from a REXX exec.