Sample REXX Code

INTDATE
Our scheduling product includes a TEST function that can be used to evaluate a date expression such as "Friday plus 2 weeks". This EXEC takes a date expression as input, invokes the TEST function and extracts the date value from the returned result. It can be invoked from the command line or as a REXX function.
REXX
An interactive REXX interpreter for MVS. Dumb but cheap! If you have it in your SYSEXEC/SYSPROC concatenation, you can type things like REXX SAY X2D(ABC2) - hex to decimal conversion from the command line!
TERMINFO
For a TSO telnet session (IBM TCP/IP), uses NETSTAT to return IP address of workstation. (Used with V2R4 and V2R6 and V2R10)
READDIR
A function that reads the directory from a PDS and returns member information on the REXX stack. See sample EXEC DODIR for an example of the use of this function.
DI
Extracts summary information from a dump dataset - used with OS/390 R2, V2R4, V2R6, V2R8, V2R10 & z/OS 1.4.
DT
Display dump title and date/time of dump for a dump dataset. (Both DT and DI will provide information about SYSMDUMP datasets too.)
FINDJSAB
Extracts information from the JSAB - current jobname, jobid, userid and component which created the JSAB - JES2 or JES3
MVSVAR
displays MVS configuration information such as operating system version and SMF system id.
RGNINFO
returns information about region limits (MEMLIMIT) and storage utilization for the current address space.
SYMDEF
displays MVS symbolic variables. If you have defined your own using SYS1.PARMLIB member IEASYMxx, you can add them to this EXEC.
ISEE
displays the arguments as seen by REXX. See OMVS Shell Programming for an example.
BOOKSEEK
scans BookManager/Read MVS bookshelves for book titles containing a specified string
URLINFO
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.
WHOHAS
use D GRS console command via SDSF to see who is enqueued on a dataset.
GETJCL
an example of using SDSF to retrieve information for the current job. This EXEC locates JCL SET statements in the JCL input dataset. It needs to be run from TSO in batch.
GETCITXT
this example processes the internal text for the current job and reports different JCL statement types and shows dataset names for the DD statements. It needs to be run from TSO in batch.
TIMEUP
computes number of days since the last IPL.
ACFRES
display ACF2 resident resources. I have tried this EXEC on Release 6.3, 6.4 and 6.5.
XDSI
invokes LISTDSI to return volume information for a dataset - copes with multi-volume disk datasets
FINDJCT
finds the JES2 JCT for the currently executing address space Offsets in the JCT can vary between JES2 releases.
LINKEXT
report on extents for linklist datasets
FINDNTTP
report on name token pair entries (refer to IEANTRT service)
ADDREGN
increase the REGION limit dynamically. A default OMVS segment must be defined or the user must have an OMVS segment.
RECALLLVL
recall all migrated datasets for a specified mask, e.g. RECALLVL MY.GDG.BASE.**. Unless a second parameter of Y is specified following the DSN mask, the EXEC only reports what recalls would have been issued.
EQUAL
demonstrates when you might wish to use == rather than the = operator in comparisons of string values. Worth keeping in mind.
SUBCOM
an example of using the SUBCOM command to determine if a specified subcommand environment is available. For example, ISPEXEC is supported when a REXX EXEC is invoked in an ISPF environment.
OEMVAT
displaying the contents of the OEM vendor anchor table
Back to the main REXX page here
Big Iron