Open MVS  Rexx

More sample REXX Code

Additional examples:

return linkedit attributes for an HFS executable.
use BPXWDYN to dynamically allocate a dataset. This can also be used from TSO or batch environments.
return the value of the specified environment variable. For example, getenv _BPX_SHAREAS
find HFS files with the same inode as a specified file. It can be used to relate the name typically used by users, e.g. /bin/find, to the element name used by SMP/E.
submit a job to JES from stdin, e.g. subjob RDASCII
read a file stored in ASCII format and convert to display format. It can be pipeed; it invokes iconv "under the covers". This could also be implemented as an alias.
invoke ISPF option 6 when OMVS has been entered from ISPF or TSO. Note that ISTART must be present in the SYSPROC or SYSEXEC concatenation for the TSO session used to invoke OMVS. ISTART determines whether the TSO session is running ISPF or not and invokes the appropriate command and is invoked by IOPT6 when ISPF does not appear as active in the same address space as the OMVS process.
parse BPXPRMxx and issue the corresponding MOUNT commands to attempt to remount any file systems that may have been unmounted. Parsing is somewhat simple-minded.
run a command under the Unix System Services shell using BPXWUNIX
invoke a command for each input line of stdin, for example: filter "say _inrec_" <some.file (_inrec_ contains the input line)

We are currently running z/OS 1.8. These samples work in our environment, but they may need to be reworked for a different environment. These samples are provided "as is". No warranty or support is expressed or implied.

Comments or suggestions can be sent to the author.

For More Information

Refer to the following books for more information: Check out Rexx Function Package for OpenEdition which is part of IBM's Unix Services Tools and Toys.

There are more examples back on the Unix System Services & REXX page. You can also visit the REXX page or the OMVS page here.

These samples are provided "as is". No warranty or support is expressed or implied.
Big Iron