You would have to know each job name/number in advance for the $DJ,LONG.
SDSF can show the entire input queue - you just select each task, get the start 
time, and cancel it if needed directly
from SDSF.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Mike Shorkend
Sent: Friday, October 19, 2018 1:17 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: SDSF and z/OSEM and Automation

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 <stars...@mindspring.com>
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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>


--
Mike Shorkend
m...@shorkend.com
www.shorkend.com
Tel: +972524208743
Fax: +97239772196

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

________________________________

This e-mail, including any attachments, may be confidential, privileged or 
otherwise legally protected. It is intended only for the addressee. If you 
received this e-mail in error or from someone who was not authorized to send it 
to you, do not disseminate, copy or otherwise use this e-mail or its 
attachments. Please notify the sender immediately by reply e-mail and delete 
the e-mail from your system.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to