Skip to content

Instantly share code, notes, and snippets.

View lbdyck's full-sized avatar

Lionel B. Dyck lbdyck

View GitHub Profile
@lbdyck
lbdyck / labdel.rex
Last active December 15, 2022 13:51
ISPF Edit Macro to Add or Remove a label
/* ------------------------- REXX ------------------------------ *
| LABDEL: Sample REXX code to set a label and to remove a label |
| based upon the provided parm. |
| |
| Syntax: labdel option |
| |
| option value: null - add the label |
| anything else - remove the label |
| |
* ------------------------------------------------------------- *
@lbdyck
lbdyck / TSO8.rex
Created December 15, 2022 13:48
Routine to report if 8 Character Userids are Allowed
/* rexx */
say 'Length of supported TSO Userids:' userid_len_check()
exit
Userid_Len_Check:
/* --------------------------------------- *
| Check the 8 character TSO Userid state. |
* --------------------------------------- */
cvt = c2d(storage(10,4))
tsvt = c2d(storage(d2x(cvt+156),4)) /* cvt + 9C */
tsvtumxl = c2d(storage(d2x(tsvt + 6), 1)) /* tsvt + 6 */
@lbdyck
lbdyck / dispall.rex
Created December 15, 2022 13:47
Display All Datasets allocated to a specific DD
/* ------------------------- REXX ---------------------------- *
| Display all of the datasets allocated to a specific DDName. |
| |
| Syntax: %LISTDDS ddname |
* ----------------------------------------------------------- */
arg cdd
if strip(cdd) = '' then exit 16
call outtrap 'trap.'
@lbdyck
lbdyck / DoAll.rex
Created December 15, 2022 13:20
DoAll - Execute an ISPF Edit Macro on All members of a PDS/PDSE
/* --------------------- rexx procedure ---------------------- *
| Name: DoAll |
| |
| Function: This rexx exec will process the specified |
| ispf edit macro against every member of the |
| specified partitioned dataset. |
| |
| Only standard system services are used. The |
| LISTD TSO command with the MEMBERS keyword |
| is used to extract the member names. |
@lbdyck
lbdyck / getipldt.rex
Last active December 15, 2022 13:51
GET IPL Date/Time For ALL LPARs in a SYSPLEX using SDSF
/* -------------------- rexx procedure -------------------- *
| Name: GETIPLDT |
| |
| Function: Using SDSF REXX query for all LPARs in the |
| SYSPLEX for IPLINFO and extract the IPL |
| date/time, and z/OS Release. |
| |
| Syntax: %getipldt |
| |
| Dependencies: SDSF REXX |
@lbdyck
lbdyck / CommaAdd
Last active December 9, 2022 14:50
REXX subroutine to Convert a number to a string with commas (e.g. 1000000 becomes 1,000,000)
/* ----------------- REXX ------------------------- *
| Take a number and display it with comma's in it. |
| |
| e.g. 1000 becomes 1,000 |
| |
| usage: comma_num = addcomma(number) |
| |
| supports numbers up to 34 digits long |
| |
| Copied from Doug Nadel |