/* REXX *** */ /* Based on expansion of IAZXJSAB macro */ /* This EXEC returns current jobname, jobid, userid and */ /* name of the component which created the JSAB */ /* for the current task / address space */ NUMERIC DIGITS 10 tcb = C2D(STORAGE(21C,4)) /* get current TCB */ jsab = 0 /* null pointer */ if tcb \= 0 then do stcb = C2D(STORAGE(D2X(tcb+312),4)) jsab = C2D(STORAGE(D2X(stcb+188),4)) end if jsab = 0 then do ascb = C2D(STORAGE(224,4)) /* get current TCB */ assb = C2D(STORAGE(D2X(ascb+336),4)) if ascb = 0 then do say 'Unable to locate JSAB from ASCB at 'D2X(ascb) exit 8 end jsab = C2D(STORAGE(D2X(assb+168),4)) if jsab = 0 then do say 'Unable to locate JSAB from ASCB at 'D2X(ascb) exit 8 end end flg1 = C2D(STORAGE(D2X(jsab+13),1)) DO WHILE flg1 > 127 eye = STORAGE(D2X(jsab),4) If eye \= 'JSAB' then do say 'Invalid JSAB found at 'D2X(jsab) exit 8 end jsab = C2D(STORAGE(D2X(jsab+4),4)) if jsab = 0 then do say 'Unable to locate a valid JSAB' exit 8 end flg1 = C2D(STORAGE(D2X(jsab+13),1)) END jbnm = STORAGE(D2X(jsab+28),8) jbid = STORAGE(D2X(jsab+20),8) comp = STORAGE(D2X(jsab+16),4) usid = STORAGE(D2X(jsab+44),8) say 'Jobname='jbnm' Jobid='jbid' Userid='usid say 'Component='comp exit 0