I use SDSF / REXX for running jobs.
You would just change the code for jobs on input queue status.
Code snippet...
/* ACCESS THE ST DISPLAY */
PARSE VALUE IPARM WITH JOBPREF ',' TIMEOUT
ISFCMDX = "ISFEXEC ST " ||JOBPREF||"*"
ADDRESS SDSF ISFCMDX
LRC=RC
CALL MSGRTN
IF LRC<>0 THEN
EXIT 20
/* LOOP FOR ALL RUNNING JOBS SPECIFIED IN PARAMETER */
say jname.0 JOBPREF||'*' ' JOBS FOUND'
/* */
DO IX=1 TO JNAME.0
IF POS(JOBPREF,JNAME.IX) > 0 & ,
QUEUE.IX = "EXECUTION" & ,
ACTSYS.IX <> "" THEN
DO
This particular code is used to find long running jobs and cancel them if
they have been running more than 2 hours.
We have a training region where users submit batch queries that can
potentially run for hours and affect batch schedules.
Liam Doherty from IBM gave a presentation on this at a SHARE conference a
few years ago.
On Sat, Oct 20, 2018 at 3:37 AM 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
>
--
Wayne V. Bickerdike
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN