IBM TSO/E REXX User Manual page 169

Table of Contents

Advertisement

Data Stack Example 2
/******************************** REXX *****************************/
/* This exec runs another exec implicitly and then sends a message */
/* when the called exec finishes. It receives as an argument the */
/* name of a PDS member to run. It activates the system procedure */
/* file SYSEXEC, allocates the data set to SYSEXEC, pushes some
/* commands on the data stack and then implicitly executes the exec*/
/*******************************************************************/
ARG dsn
"EXECUTIL SEARCHDD(yes)"
PUSH "SEND 'Sequence over' USER(*)" /* Put a message on the stack*/
PUSH "TIME"
PUSH "FREE F(SYSEXEC)"
PARSE VAR dsn name '(' member /* Separate the data set name from */
"ALLOC DA("name") F(SYSEXEC) SHR REUSE"
execname = STRIP(member,t,')') /* Remove the last parentheses from*/
PUSH '%'execname
/*******************************************************************/
/* The output from this exec depends on the exec that it runs.
/* Output can be as follows:
/*
/*TIME-01:23:56 PM.CPU-00:00:23 SERVICE-297798 SESSION-04:15:20 MAY*/
/*12,1989
/* Sequence over USERID
/* READY
/*******************************************************************/
Protecting Elements in the Data Stack
/* Establish the system library SYSEXEC*/
/* Push the time command
/* Push command to free SYSEXEC*/
/* the member name. */
/* the member name.
/* Put the member name on the stack*/
Chapter 11. Storing Information in the Data Stack
*/
*/
*/
*/
*/
*/
*/
*/
*/
151

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents