The $DJxxxx,LONG command returns a field with the job creation date and time. You could pull this with REXX and the CONSOLE command and then do the math.
$DJ(827),LONG $HASP890 JOB(MIKEBR14) 536 $HASP890 JOB(MIKEBR14) STATUS=(AWAITING EXECUTION),CLASS=Z, $HASP890 PRIORITY=7,SYSAFF=(ANY),HOLD=(NONE), $HASP890 CMDAUTH=(LOCAL),OFFS=(),SECLABEL=, $HASP890 USERID=MIKE,SPOOL=(VOLUMES=(VPSPOL), $HASP890 TGS=1,PERCENT=0.0052),ARM_ELEMENT=NO, $HASP890 CARDS=2,DUBIOUS=NO,REBUILD=NO, $HASP890 SRVCLASS=BATMDM,SCHENV=,SCHENV_AFF=(ANY), $HASP890 CC=(),DELAY=(),CRTIME=(2018.292,17:13:56) Note that the time returned is UTC and not local HTH Mike On Fri, 19 Oct 2018 at 19:36, Lizette Koehler <[email protected]> wrote: > So I want to create a process that "notices" that a job has been in the > JES2 > Input queue for over 24 hours and not run. > > Sometimes this is legitimate and sometimes not. > > With z/OSEM we add resource names so the users do not need to code /*ROUTE > XEQ > lpar to run. > > What I find is sometimes the resource name created in the JCL is not valid > for > the environment. > > I know I can issue $DJxxxx,LONG and find out what resource it is waiting > on. > > What I am struggling with is how can I see the INPUT queue and determine > how > long a job has been waiting. > > I am thinking something with ISFEXEC (SDSF) that I can pass to automation > to > make the determination and/or cancel of the task. > > I am just in the design phase, so no real details other than this sketch > of the > process. > > Thanks > > > Lizette > A theory can never be proven, but it can be falsified. Karl Raimund Popper > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > -- Mike Shorkend [email protected] www.shorkend.com Tel: +972524208743 Fax: +97239772196 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
