/*REXX Display userid info */ say 'Userid >'||userid()||'<' say 'Jobname >'||jobname() say 'Jstepnme>'||jobstepname() say 'Stepname>'||stepname() say 'ACEEptr >'||acee() say 'RACFuid >'||aceeusri() say 'RACFgrp >'||aceegrpn() return /* Standard MVS control blocks imbed member */ /* =============================================================== */ /* xxx - return address of common mvs control blocks */ /* =============================================================== */ /* ascb returns the ascb address */ ascb: procedure; return c2x(storage(xpx(psa(),'224'),4)) /* asxb returns the asxb address */ asxb: procedure; return c2x(storage(xpx(ascb(),'6C'),4)) /* acee returns the acee address */ acee: procedure; return c2x(storage(xpx(asxb(),'C8'),4)) aceeusri: procedure; return storage(xpx(acee(),'15'),8) aceegrpn: procedure; return storage(xpx(acee(),'1E'),8) /* asid returns the ascb identifier in hex */ asid: procedure; return c2x(storage(xpx(ascb(),'24'),2)) /* cvt returns the address of the cvt */ cvt: procedure; return c2x(storage(xpx(psa(),'10'),4)) /* jbniptr returns the pointer to the jobname field for initiated programs */ jbniptr: procedure; return c2x(storage(xpx(ascb(),'ac'),4)) /* jbnsptr returns the pointer to the jobname field for started tasks */ jbnsptr: procedure; return c2x(storage(xpx(ascb(),'b0'),4)) /* jobid returns the job identifier (eg. STC00001) */ jobid: procedure; return storage(xpx(ssib(),'0c'),8) /* jobname returns the jobname for the current program */ jobname: procedure jbnptr=jbniptr() if jbnptr="00000000" then jbnptr=jbnsptr() return storage(jbnptr,8) /* jobstepname returns the job stepname */ jobstepname: procedure; return storage(xpx(tiot(),'10'),8) /* jscb returns the address of the jscb */ jscb: procedure; return c2x(storage(xpx(tcb(),'b4'),4)) /* psa returns the address of the psa */ psa: procedure; return '00' /* smca returns the address of the smca */ smca: procedure; return c2x(storage(xpx(cvt(),'c4'),4)) /* smfid returns the smfid for the system */ smfid: procedure; return storage(xpx(smca(),'10'),4) /* ssib returns the address of the ssib */ ssib: procedure; return c2x(storage(xpx(jscb(),'13c'),4)) /* ssname returns the sub-system name */ ssname: procedure; return storage(xpx(ssib(),'08'),4) /* stepname returns the stepname */ stepname: procedure; return storage(xpx(tiot(),'08'),8) /* tcb returns the tcb address */ tcb: procedure; return c2x(storage(xpx(psa(),'218'),4)) /* tiot returns the tiot address */ tiot: procedure; return c2x(storage(xpx(tcb(),'0c'),4)) /* xpx routine adds two hex value together */ xpx: procedure; return d2x(x2d(arg(1))+x2d(arg(2))) /* xmx routine subtracts hex values */ xmx: procedure; return d2x(x2d(arg(1))-x2d(arg(2))) /* */