This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ----------------- 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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -------------------- 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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* --------------------- 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. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ------------------------- 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.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ------------------------- 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 | | |
| | | |
* ------------------------------------------------------------- * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ---------------------- REXX ----------------------------- * | |
| ISPF Edit Macro to display the requested record in hex in | | |
| an infoline. (Note: no validation is performed) | | |
| | | |
| Syntax: EHEX line | | |
| | | |
| Where EHEX is the macro name (change as you wish) | | |
| line is a record number | | |
| | | |
| Sample: EHEX 4 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sample REXX code to use grep to search a z/OS sequential dataset for a string: | |
/* rexx */ | |
arg file string | |
x = searchstring(file,string) | |
if x = 0 then do | |
say 'No results found for:' string | |
exit 4 | |
end | |
do i = 1 to results.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This routine will test if the active user has the | |
ability to access UID 0 (superuser) | |
*/ | |
Check_UID0: | |
address syscall 'geteuid' /* get current euid */ | |
euid = retval | |
address syscall 'seteuid 0' /* try to set uid 0 */ | |
if retval /= 0 then do | |
gooduid0 = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ---------------------------------------------------- * | |
| Change the zus4anyc (SRCHFOR default) to selected (/) | | |
| if it is null with option Set. | | |
| Or option Reset restore it. | | |
| | | |
| Use this before and after thus: | | |
| | | |
| Address ISPExec | | |
| call check_anyc 'SET' | | |
| "LMDINIT LISTID(LISTID) LEVEL("hlq"."file_pfx"*)" | |
OlderNewer