Created
April 21, 2017 13:13
-
-
Save lnlyssg/e523a67f40f0a8a2717b12c81a07d18a to your computer and use it in GitHub Desktop.
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 */ | |
/* Developed by S. Tresadern */ | |
cvt = c2x(Storage(10,4)) | |
asvt = mvsaddr(cvt 22C 4) | |
asvtmaxu = x2d(mvsaddr(asvt 204 4)) | |
do i = 0 to asvtmaxu - 1 | |
offset = d2x(x2d(210) + (i * 4)) | |
ascb = mvsaddr(asvt offset 4) | |
ascbascb = x2c(mvsaddr(ascb 0 4)) | |
if ascbascb = 'ASCB' then do | |
ascbjbns = mvsaddr(ascb B0 4) | |
jobname = x2c(mvsaddr(ascbjbns 0 8)) | |
cscb = mvsaddr(ascb 38 4) | |
procname = x2c(mvsaddr(cscb 20 8)) | |
say jobname procname | |
end | |
end | |
Exit | |
/**** Subroutine *********************************/ | |
Mvsaddr: | |
procedure | |
arg address offset length . | |
above = 'NO' | |
if length(address) = 8 then do | |
topbyte = substr(address,1,2) | |
if topbyte >= '80' then do | |
above = 'YES' | |
address = substr(address,3) | |
end | |
end | |
address = d2x(x2d(address) + x2d(offset)) | |
if above = 'YES' then address = topbyte||address | |
addr = storage(address,length) | |
addr = c2x(addr) | |
return addr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment