This file contains hidden or 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 */ | |
jobn = MVSVAR('SYMDEF','JOBNAME') | |
call outtrap 'j.' | |
'st' jobn | |
call outtrap 'off' | |
do i = 1 to j.0 | |
if wordpos('EXECUTING',j.i) > 0 then leave | |
end | |
parse value j.i with . '('jobnum')' . |
This file contains hidden or 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
/* ----------------------------------------------------- * | |
| Small routine to put into a rexx exec invoked during | | |
| TSO Logon, or manually after, to test for a zfs being | | |
| mounted and if not then to mount it. | | |
* ----------------------------------------------------- */ | |
if listdsi("'userid.zopen.zfs'") = 4 then do | |
x = syscalls('ON') | |
path = '/u/userid/zopen/etc/' | |
address syscall , | |
'lstat (path) st.' |
This file contains hidden or 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
#!/bin/sh | |
# this short shell script will allow the shell user to invoke | |
# any TSO command that resides in a load library that is not | |
# in the STEPLIB or Link List. | |
# | |
# Change the hlq.load.library to your load library and enjoy | |
# | |
# Copy into a directory in your PATH to use as a shell command | |
# and issue chmod +x xxxxx (where xxxxx is the name you gave to |
This file contains hidden or 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
AddComma: Procedure /* Code provided by Doug Nadel back before the turn of the century */ | |
arg bignum | |
cbignum = strip(translate('0,123,456,789,abc,def,ghi,jkl,mno,pqr,stu,vwx', , | |
right(bignum,34,','), , | |
'0123456789abcdefghijklmnopqrstuvwx'),'L',',') | |
return cbignum |
This file contains hidden or 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 ------------------ * | |
| SwapEQ - Swap the sides of an = setting | | |
| a = b | | |
| becomes | | |
| b = a | | |
* --------------------------------------- */ | |
Address ISREdit | |
"Macro (range) NOPROCESS" | |
"PROCESS RANGE S" | |
"(start) = linenum .zfrange" |
This file contains hidden or 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 ---------------------- * | |
| This is a sample routine using REXX to deternmine | | |
| if a file exists within OMVS. | | |
* ------------------------------------------------- */ | |
file = '~/.profile' | |
rc = exist(file) | |
if rc > 0 then say 'File exists' | |
else say 'File does not exist' | |
file = 'bad.file' | |
rc = exist(file) |
This file contains hidden or 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 */ | |
/* call USS sleep routine */ | |
parse arg sleep_sec . | |
say time() | |
address 'SYSCALL' 'SLEEP ('sleep_sec')' | |
say time() | |
return 0 |
This file contains hidden or 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"*)" | |
This file contains hidden or 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 |
NewerOlder