It is possible to execute a REXX inside another REXX using the EXEC command.
For example, we shall use this approach to Read the pdsname and member name and pass this information to an another REXX procedure which will work upon this file and produce an output file. We shall open that output file and show it to the user using the outer REXX.
Lets us name the REXX reading the PDSNAME and Member Name as REXX 1.
Lets us name the REXX processing the member as REXX 2.
Rexx 1 should call the REXX 2 using the following code
"EXEC 'Dataset where REXX 2 is residing' '"Input-file"'"
Rexx 2 will process the Input file and produce an output file.
This output file could be opened from REXX 1 and displayed to the user using the following code.
ADDRESS ISPEXEC "EDIT DATASET("OUTPUT-FILE") "
In case of queries, please post in the comments.
Showing posts with label Opening dataset in edit mode. Show all posts
Showing posts with label Opening dataset in edit mode. Show all posts
Subscribe to:
Posts (Atom)
Featured Post
REXX Skeleton: Submitting jobs through Rexx
Submitting jobs through REXX and reading the spool through REXX gives us immense potential to automate many manual activities in mainframes....
-
Abend S013 SYSTEM COMPLETION CODE=013 REASON CODE=00000018 AN OPEN WAS ISSUED FOR A PARTITIONED DATASET. THE SPECIFIED MEMBER NAME WAS N...
-
In order to read the dataset and member name of the opened member, use the following REXX code. After executing this REXX code, the varia...
-
A word is defined as a blank delimited set of characters within a string in REXX. The characters in a word can be alpha, numeric, alphanume...