Hello
I need to run certain checks on active jobs and i'm unable to retrieve the time when the job in question started running.
The only idea was to get this info from the control blocks but found no manual that describes the structure of the different control blocks
and so i can not setup the pointer and storage area and so on...
I found some examples as to how to retrieve jobname but what i need is the time...:
/* Rexx */
/* --- Get Address of ASCB ----------------------- */
ASCB_Addr = C2D(Storage(224,4)) /* Get address of ASCB */
/* --- First check ASCBJBNI for Jobname ------------------- */
Interpret "JobAddr = Storage("D2X(ASCB_ADDR+172)",4)"
If C2D(JobAddr) = 0 Then
/* --- Not in initiator, so get jobname from ASCBJBNS -- */
Interpret "JobAddr = Storage("D2X(ASCB_ADDR+176)",4)"
Interpret "Job = Storage("C2X(JobAddr)",8)"
say "Jobname: " Job
exit
Or
/* REXX Get taskname from TCB */
cvt = storage(10,4) /* FLCCVT-PSA data area */
tcbp = storage(d2x(c2d(cvt)),4) /* CVTTCBP */
tcb = storage(d2x(c2d(tcbp)+4),4)
tiot = storage(d2x(c2d(tcb)+12),4) /* TCBTIO */
say storage(d2x(c2d(tiot)),580) /* TIOCNJOB */
i somehow should loop throuhg all the active jobs and find out when they each was started.
If i'm not on track at all, any other idea is welcome.
Thanks,
David