Most OMVS programming interfaces available through the C language are also
supported through REXX, through the SYSCALL environment. Users who are
authorized to use OMVS can invoke these APIs from either inside the OMVS
environment or by setting up the REXX SYSCALL environment. See the
GETPWENT EXEC for sample REXX code to set up the SYSCALL environment.
An example of using an OMVS facility in the MVS environment would
be using the SLEEP function:
address syscall 'sleep 120'
could be used in a REXX EXEC to wait 2 minutes in the OMVS environment.
EXEC sleep can be used if the EXEC will be
invoked from TSO or batch. This will only work if the userid making
use of this EXEC is authorized to use OMVS.
The SH environment may be used to execute commands from the OMVS shell. Note that
/bin/sh is used regardless of what shell program is in the user's OMVS profile.
attempts to identify the current execution environment: batch, tso,
appc, omvs, started task. Oddly enough, there may be circumstances in
working with OMVS when it is important to find this out.
You may need to rename it since USS provides its own /bin/whoami after
V2R4.
extracts environment variable settings. Similar REXX code could be
used to make OMVS environment variable settings available for use by a
REXX routine.
uses groff to format man pages for use on z/OS Unix. The current directory
is assumed to be a man# directory containing man page source. For example,
fixman perl*.1 in directory man1 would create formatted man pages in the
corresponding cat1 directory for all files matching the pattern perl*.i.
Groff is available from GNU Troff.
given a URL, it retrieves the header information for the document. This EXEC uses
the REXX socket interface of IBM's TCP/IP OS/390. Inspired by
"TCP/IP Socket Programming with REXX" located on an earlier edition
of IBM's REXX tutorial page. This may not work under
USS running inside the original TSO address space. Works OK in other USS
environments. This was not working on OS/390 V1R2.
modeled after the TSO OSHELL EXEC. This EXEC uses the process-id to
create unique temporary file names. It can be used from TSO (or TSO in batch)
to run a command under the USS shell. Messages are copied to the same destination
as TSO messages. For example, MYSHELL ls -l
Similar to MYSHELL above, this EXEC executes a program using BPXBATCH.
It is intended for use from TSO (or TSO in batch).
For example, RUNPGM /bin/who -a