Certain REXX execs invoking the GET_JCL_DETAIL routine shown below started failing, job ending CC 3656.
This routine was previously totally stable.
The compiled REXX abends...
EAGREX4000E Error 40 running compiled SLAALARM, line 504: Incorrect call to routine
EAGREX4010I Result not a whole number
EAGREX4010I Result not a whole number
PARSE VALUE GET_JCL_DETAIL('FF'X),
WITH p1'FF'X p2'FF'X p3'FF'X p4'FF'X p5'FF'X p6'FF'X .
jobid = STRIP(p1)
jobname = STRIP(p2)
jobttl = STRIP(p3)
...
/*===================================================================*/
/* GET JCL DETAILS */
/*===================================================================*/
GET_JCL_DETAIL: PROCEDURE
psatold = X2D('21C')
tcbjscb = X2D('B4')
jscbssib = X2D('13C')
ssibsuse = X2D('20')
sjbsjb = X2D('18')
sjbjct = X2D('24')
tcbaddr = CONTENTS(psatold)
jscbaddr = CONTENTS(tcbaddr+tcbjscb)
ssibaddr = CONTENTS(jscbaddr+jscbssib)
sjbaddr = CONTENTS(ssibaddr+ssibsuse)
nextsjb = CONTENTS(sjbaddr+sjbsjb)
DO WHILE (nextsjb<>0)
sjbaddr = nextsjb
nextsjb = CONTENTS(sjbaddr+sjbsjb)
END
jctjname = X2D('6C') /* jobname */
jctjobid = X2D('120') /* job id number */
jctpname = X2D('128') /* programmer name */
jctnotus = X2D('1B0') /* notify userid */
jctjusid = X2D('1BA') /* userid from job */
jctacctn = X2D('150') /* account number */
jctaddr = CONTENTS(sjbaddr+sjbjct)
RETURN getjct(jctjobid,8)'FF'X,
!! getjct(jctjname,8)'FF'X,
!! getjct(jctpname,20)'FF'X,
!! TRANSLATE(getjct(jctnotus,8),'40'X,'00'X)'FF'X,
!! getjct(jctjusid,8)'FF'X,
!! C2X(getjct(jctacctn,4))'FF'X
/*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
/*===================================================================*/
/* return the JCT address */
/*===================================================================*/
GETJCT: PROCEDURE EXPOSE jctaddr
RETURN STORAGE(D2X(jctaddr+ARG(1)),ARG(2)) /*>>>>>>>>>>>>>>>>>>>>>>>>*/
/*===================================================================*/
/* return the data at an address */
/*===================================================================*/
CONTENTS: PROCEDURE
ARG addr
RETURN C2D(STORAGE(D2X(addr),4)) /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
WITH p1'FF'X p2'FF'X p3'FF'X p4'FF'X p5'FF'X p6'FF'X .
jobid = STRIP(p1)
jobname = STRIP(p2)
jobttl = STRIP(p3)
...
/*===================================================================*/
/* GET JCL DETAILS */
/*===================================================================*/
GET_JCL_DETAIL: PROCEDURE
psatold = X2D('21C')
tcbjscb = X2D('B4')
jscbssib = X2D('13C')
ssibsuse = X2D('20')
sjbsjb = X2D('18')
sjbjct = X2D('24')
tcbaddr = CONTENTS(psatold)
jscbaddr = CONTENTS(tcbaddr+tcbjscb)
ssibaddr = CONTENTS(jscbaddr+jscbssib)
sjbaddr = CONTENTS(ssibaddr+ssibsuse)
nextsjb = CONTENTS(sjbaddr+sjbsjb)
DO WHILE (nextsjb<>0)
sjbaddr = nextsjb
nextsjb = CONTENTS(sjbaddr+sjbsjb)
END
jctjname = X2D('6C') /* jobname */
jctjobid = X2D('120') /* job id number */
jctpname = X2D('128') /* programmer name */
jctnotus = X2D('1B0') /* notify userid */
jctjusid = X2D('1BA') /* userid from job */
jctacctn = X2D('150') /* account number */
jctaddr = CONTENTS(sjbaddr+sjbjct)
RETURN getjct(jctjobid,8)'FF'X,
!! getjct(jctjname,8)'FF'X,
!! getjct(jctpname,20)'FF'X,
!! TRANSLATE(getjct(jctnotus,8),'40'X,'00'X)'FF'X,
!! getjct(jctjusid,8)'FF'X,
!! C2X(getjct(jctacctn,4))'FF'X
/*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
/*===================================================================*/
/* return the JCT address */
/*===================================================================*/
GETJCT: PROCEDURE EXPOSE jctaddr
RETURN STORAGE(D2X(jctaddr+ARG(1)),ARG(2)) /*>>>>>>>>>>>>>>>>>>>>>>>>*/
/*===================================================================*/
/* return the data at an address */
/*===================================================================*/
CONTENTS: PROCEDURE
ARG addr
RETURN C2D(STORAGE(D2X(addr),4)) /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/