Frank Clarke's REXX Treasury

Most of it original, but some borrowed, hijacked, or stolen.

Since about 2021 or so, I have been working on the CBT Tape machine grooming my old code and writing new stuff.  Almost everything here will work at your site.  Rarely, some chunk of code will be specific to this employer or that one and is only useful as an example of how you might go about doing some particular task.  In any case, if you should find any of it useful, you're welcome to it.  At the ripe old age of 80, I'm unlikely to actually need any of it myself anymore.

Some of it is pretty damn good if I do say so myself.  In particular, I recommend JFORM, DEIMBED, SUPBR, SUPED, FETCH, KED.  Some of these are pretty complex and consequently hard to understand, but I guarantee they're worth the effort.  Send me a note at "rexxhead@yahoo.com"  if you have any problems.  Of course, you don't have to understand them in order to use them, only if you decide to change them.

Beware!  There is no FTP available for these, so 'downloading' means 'cut-and-paste'.  Sorry.

Recently, I re-edited many routines to remove the US dollar-sign because that character gives European users fits.

More recently, several routines have been made 'RUNDATA-aware'.  RUNDATA is a routine that enables customization-needed software to be auto-customized site-by-site.  If any routine complains about the RUNDATA table not having some necessary data, or the RUNDATA table being completely missing, you will have to correct that yourself.  The RUNDATA HELP text will tell you how:
        ==> tso rundata ? 
or you can adapt PUMPDATA to the task.

Then there's the problem of the octothorpe (pound or hashtag).  Neither the FTP I'm using nor the website where this page is hosted play well with that character, and some of my code used that character in their member names up on the mainframe.  Therefore, some code you might have picked up here once upon a time may seem to be 'missing'.  Nope, it's just been renamed to enable it to exist here without fussing.

 

Code Name Type Description
$AUTOCUS text Describes auto-customization technique for RUNDATA
$EXAMPLE fragment New paragraph template for MAKEPARA
$HOWTO text How to operate RUNDATA
@ALLOC fragment Allocate a dataset
@BACKLVL fragment Determine if a table is back-level
@DISPRL fragment How to scroll left and right
@ICESORT fragment Sort data using ICESORT
@INSTLME fragment Put new command on the command table
@LBLID macro Add a prefix to a label
@LOGMSG fragment How to keep a progress log
@NEWAA fragment Add a new row on TBLMSTR
@NEWPREF macro Reassign a label prefix
@PLIEXMP data The pro-forma pattern for a new PLI paragraph
@POPUP fragment How to deliver a pop-up menu
@RESTART fragment How to start-from-READY
@SHIFT fragment Dual-case a string of words (FIXNAME)
@TBCLOSE fragment TBCLOSE
@TBDISPL fragment TBDISPL
@TBOPEN fragment TBOPEN a table
@TBSORT example Implement a SORT primary command
@TLIBNEW fragment TBOPEN + TBLGEN for new table
@TLIBPRE fragment Set up TLIB/TABL in LOCAL_PREINIT
@TRACE fragment Enable tracing in subroutine
@USETABL fragment Set ISPTLIB from LISTA
ACQ exec Copy a member to the 1st dataset of a file
ADDCMDS exec Apply TMPCMDS to ISPCMDS
ADDSW macro Interrogate sw.0error_found
ADDXREF exec Add ISPF statistics to a compiler listing
ALIASGEN exec Automate setting of dataset aliases
ALIST exec Display current allocations
ALLMEM exec Apply a macro to all members of a library
ALLPLIB macro Queue all PLIBs from the listing dataset
ALLUSERS exec Rebuild table USER from RACF listing
AMORT exec Amortization schedule
ARRANGE demo Resequencing a table
ASMMAP exec Assemble a CICS map
ATTACH exec Logon customization
BACKUP exec Make a backup of a PDS via SEQ2PDS
BADCOMM macro Find incomplete comments
BLKCOMM macro Convert each-line-a-comment to block comment
BLOX exec Block letter write modeled after IEFSD095
CALLEDBY macro CALLs and their targets
CLIPLINE macro Clip long lines after a named token
CLNXREF macro Exclude matching stats
CMDUPD exec Update local command table
COLFORM macro Columnarize a data stack
COMBINE exec Combine 2 or more datasets with incompat DCBs
COMMANDS exec Display current command table contents
COMPARM exec Maintain parameters for COMPILE
COMPDT exec Reports the compile-date for LOAD modules
COMPILE exec Background compile of foreground source
COMPSTAT macro For listings, sets member stats
CVTINFO exec Display CVT information
DC macro DotCommand by David Visage
DEADCODE macro Find all unreferenced blocks.
DECLOCN macro Annotate Assembler listing
DECOMM macro Remove blank comment blocks
DEHELP macro Prepare canonical HELP text for modification
DEIMBED fragment Extract ISPF elements from REXX
DENUM macro Denumber source in listing dataset
DFLTS macro Display all control characters for ISPSLIBs
DFLTTLIB fragment How to set up a default ISPTLIB
DIREXAM exec Display directory entries in hex-vert form
DIRSTATS exec LISTD with statistics
DSPROF exec Display via LISTDSI dataset characteristics
DSVCSI exec Catalog Search Interface
DUMPDATA exec Generate a reload exec for RUNDATA
DUP exec Allocate or copy-to a new dataset
EDBR macro Edit-from-Browse
ELEMENTS macro For listings, display Attribute list
ELEMLEN exec Calc storage needed for a variable
ENTCOMM macro Adjust END statements for Enterprise compiler
EXTTST demo How to use RXVSAM
FACTORL exec Factorial processor
FACTORS exec Calculate the integer factors of a number
FCCMDUPD exec Insert a new command onto TMPCMDS
FCXREF exec Cross-reference 2 or more PDSs
FETCH exec Get datasets by nickname
FIBONACI exec Fibonacci sequence
FINDLIBS exec Find all libs of selected users and LLQs
FINDORIG fragment Find the DSN from which this EXEC is running
FIRSTIME exec Control re-runs
FIXDCB exec Fix a broken DSCB
FIXNAME fragment Capitalize initial letters
FIXSTATS exec Manipulate ISPF member stats (@SHIFT)
FIXTBL exec Jump to ISPF 3.9
FIXTOOL exec Software-error reporting vehicle
FLIP macro Show excluded and hide non-excluded lines
FLTTBL exec Flatten any table (see RSTTBL)
FSMSG exec Send a multi-line message
FTPERR exec Analyze FTP return codes
GCL text Explains Global Conformed Line
GENCARD exec Produce control card from parms
GENSAR exec Generate control cards for SAR Retrieve
GETGDG exec Get real DSN for a generation
GETIA macro Extract Impact Analysis from REXXSKEL-based code
GETNAME exec Get username from internal control blocks
HERO exec Hero''s formula for the area bounded by 3 sides
HEXCHARS macro Generate list of hex values 00-FF
HSMLIST exec Ease the interface to HSM
HURL exec NDM ship to remote site
IDENT macro Insert membername to REXX code
IOSTMT macro Show all I/O statements
ISOLATE macro ONLY this word
JFORM macro Reformat JCL
JOBCARDS exec Build/update default jobcards for JCL
JOBID exec Get JOBID and JOB# from internal control blocks
JOBRC exec Find the RC of a JOB in storage.
JSPLIT macro Splits JCL one parameter per line
KED macro Edit DDN(mbr); aliased as KBR and KVW
LA exec LISTA ST
LCOMM macro Insert line comment
LDOW exec Calc nth-day-of-the-week for any month
LIBSTATS exec Count members, aliases, and lines for the DSN.
LISTCSUM exec LISTCAT subroutine for VCX
LISTUSR exec Display all known userids with names (see ALLUSERS)
LOCATES fragment How to TBSCAN/REFIND
LOGLOG exec Writes a line in #LOGON.RPT for each LOGON.
MACSKEL fragment macro code base
MAKEPARA macro Generate new paragraph for REXXSKEL-based code
MARK macro Tag a line with a hyphen
MBTI exec Myers-Briggs Type Indicator
MDEL exec Delete a member from anywhere
MEMBERS exec Return memberlist to the stack
MEMIDX exec Create/Update #INDEX
MEMLIST exec Member list with expanded selection
MIGRATE exec Migrate code from work to final
MODNOTE macro Add a modification note to the history block
MREN exec Rename a member from anywhere
MTHLIM exec Determine Start-DOW and length of a month
NEWALIAS exec Specify new dataset alias
NOMACRO fragment Error block when MACRO called as EXEC
NONOTS macro Convert non-standard NOTs to standard NOTs
NOOP exec IEFBR14
NORXSKEL macro Hide REXXSKEL base code during update
ONEPERLN macro Splits PL/I source lines
ONLY macro Exclude all except selection
OPENMODE fragment Set OPENMODE.
OPENTBLS exec List all tables currently open
ORDINAL subr Calc ordinal of number (1st 2nd 3rd 4th...)
OUTDENTS macro Show only do-end etc.
PACKING fragment How to convert to/from FIXED DECIMAL
PARSEDCL macro Annotate structure DCL with column info
PDSCOPYD exec Copy a member with stats
PDS2SEQ exec Convert PDS to IEBGENER input
PERMCLAS fragment Supply STGCLASS and MGMTCLASS
PGFS macro Show all paragraph names
PLIFLOW macro Shows CALLs, GOTOs, and targets
PLILBLS macro Like PLIFLOW; show labels and referents
PLIMSGE macro Puts error msgs in-line on listings (Enterprise)
PLIMSGO macro Puts error msgs in-line on listings (Optimizer)
PLIMSGS macro Driver for PLIMSGE and PLIMSGO
PLINIT macro Adds initialization to PL/I DCL
PLIPARA macro Insert new empty paragraph
PLIPOS macro Similar to PARSEDCL
PLISKIP macro Replace carr-ctl with preprocessor cmds
PLIXREF macro Adds stmt# refs to a listing (driver)
PLIXREFE macro ~~ for Enterprise
PLIXREFO macro ~~ for Optimizer
POPINDX exec Populate one #INDEX member from another
POPUTBL exec Populates the FINDLIBS USERTBL
POSIT macro Position an Edit/View session
POST exec Log activity to the ISPF LOG file
PREVNAME macro Find prior "./" line in a PDS2SEQ backup
PRODDATE exec Build INCLUDE set of various date variables
PROFILES exec Manipulate Edit profiles
PROFVARS exec Display variables in profiles
PUMPDATA demo Load datapoints to the RUNDATA table
QHELP macro Sub of TOOLHELP
QIO macro Find and count all files by type
QJAM macro Check that all stmt#s are present
QPWEXP exec When does my password expire?
QRYTBL exec Display all info about a table
QSQL macro Analyze all the SQL statements
RACLIST exec Display RACF profile for a user
RDSPLAIN text More information about RUNDATA operations
REALIAS exec Re-establish aliases from the Impact Analysis
REHELP macro Re-enable HELP after modifications
REPGEN exec Create record declares in PLI or COBOL
RESTAT exec Clone of FIXSTATS; call from VIEW/BROWSE mbrlist
RESTORE exec The anti-process of BACKUP
REXXIA exec Do an Impact Analysis for an entire dataset
REXXSKEL example Basis for most code here
RSTTBL exec Restore a table flattened by FLTTBL
RUNDATA exec Maintain application-specific information
SAMPLE exec Show first -n- lines of every member
SAYVAR exec Display/Update variables from ISPF pools
SCHED exec Create a calendar page for one month
SEARCHME exec Search within a PDS
SEECHARS exec Like NOSEEUM
SEGMENT macro Label start and end of compiler sections
SEIZE exec Copy a member to a distant dataset with stats
SELMATCH macro Match )SEL and )ENDSEL in skeleton
SEQ2PDS exec Anti-process of PDS2SEQ
SETALIAS exec Establish dataset aliases
SETEPROF macro Set ZDEFAULT profile
SETREFS macro Change JCL DSNs to backward-references
SHORTPG macro Delete extraneous lines on compiler listing
SHORTRX fragment No-frills REXX-base
SHOWDATA exec Full-screen access to RUNDATA
SHOWFLOW macro Display CALLs and targets in REXX
SHOWLIBS exec Display all user EXEC libraries
SHOWME exec Display first-found by DDName
SHOWSYM exec Display static system symbols
SKEL fragment Panel skeleton for DEIMBED use
SKELH fragment HELP-Panel skeleton for DEIMBED use
SKELT fragment Table-Panel skeleton for DEIMBED use
SKINNY macro Hide all non-REXXSKEL code
SLICKIO macro (Source) align all file DCLs
SORTCMDS exec Sort a Command Table
SOURCE demo Show parsing of 'source' builtin.
SPLITDO macro Split if...do
SQRT exec Square root (claimed by Robin Ryerse)
STAKEDIT exec Recursive Edit/Browse/View (ED/BR/VW)
STEPS macro Bring out all JCL EXEC rows
STRLEN macro Display a length-line over a quoted string
STRSORT exec Sort a string of words
SUPBR exec SuperBrowse
SUPED exec SuperEdit
SYMDEFS exec Show system symbolics and values
SYSAMON exec Groom/Report activity in SYSUMON
SYSEMON exec Edit a SYSUMON.KSD
SYSUMON exec Count tool usage
SYSVARS exec Show SYSVARs and MVSVARs
S2PTRIM macro Summarize a SEQ2PDS dataset
TBCOPY exec Copy a table using AAMSTR
TBLENQ exec Display enqueue contention for dataset
TBLGEN exec Build a table from AAMSTR specs
TBLMSTR exec Maintain AAMSTR table
TBLOOK exec Examine and update any table
TBLOPS exec Operate on open tables.
TBLSTATS exec Populate ISPF stats for an ISPTLIB dataset
TBREPRO exec Make an exact copy of a table
TCPINFO exec Display TCP information
TEXAM exec Calls TBLOOK from a member list
TEXAMU exec TBLOOK from the memberlist
TIMEMATH exec For any hh:mm:ss, show percentage values
TOOLHELP exec Display all members with real HELP segments
TRAPOUT exec Trap trace output to DASD
TRIMPLI macro Excise SQL junk from listing
TSOHELP exec Full-screen HELP
UPDSTAT exec Update ISPF statistics
UPOE exec Update ISPF statistics
UPOE@$ST exec Update ISPF statistics
USERRPT exec Compare user inventory to prior run
VCX exec Show IDCAMS for any file
VSAMINIT exec Write a record via RXVSAM and delete it
VSBROWSE exec Browse VSAM file
VSPROC demo Driver for RXVSAM
VWBR exec View from Browse
WB exec Insert "Written by" data
WBNAME data Data for WB
WHATINC macro Return on stack all %INC object names
WHEREAMI exec Display CPU and current node.
ZLC exec LISTCAT to a dataset