View previous topic :: View next topic
|
Author |
Message |
wik123
New User
Joined: 13 Jul 2018 Posts: 8 Location: Nederlands
|
|
|
|
Hi Team,
I need a help for, one of my job i need to make it into error / abend state if its waiting for more than 15 mint in scheduler.
Code: |
//SDADCFP2 JOB AD000000,MSGCLASS=2,COND=(8,LE)
//*OPCEXIT
//*ROUTING
/*JOBPARM PROCLIB=PROC66
//**
//STEP01 EXEC ZJ073,
// DSN='AD#S@.CTNTRA.###.SORTCDB.ERROR'
//STEP02 EXEC ADCFP2
|
this is the data in the job and its a 2nd job in the batch.
Code: |
Operation Text Jobname
ws no. t
CGEN 004 Checks for Error file___ SDADCFP2
CMFX 005 MQ-FTE JOB FOR DELIVERY_ SDADF#P2
|
As per my understand TIME parameter we can use only when if its executing phase.
can any one please help ?
thanks in advance. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
If I understand what you are asking, you want to determine the time from when the job was submitted to the current time. This can be done, though it is not trivial. You need to traverse some control blocks to get the submission date & time. I have the notes, but I can't access them at the moment. Another problem is you have to compute current date & time minus submission date & time which can be moderately difficult if the dates are different. I think there is an example of this computation over in the beginner's forum from several years ago and I'm too lazy to find it now. It was intended for SMF data and potentially has problems if the difference is in months, but this is not an issue you are likely to face.
However, I'm not so certain that what I think you want is something that is useful, but ... |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
Not an easy answer to this one. If I understand it correctly, you want the job to go in to error status in TWS if it's been waiting for more than 15 minutes? What it's waiting for is not clear, but perhaps not relevant. Essentially you cannot do that as far as I'm aware, but there are perhaps other ways to accomplish something similar.
Assuming you can identify the start of the 15 minute interval then the easiest way would probably be to run a job on a "wait" work-station for 15 minutes, then run a TWS batch script to check the status of the job you're interested in. If it's still waiting, this new job could go in to error, or even just set the waiting one to error state.
Other options that spring to mind are to use the deadline WTO function to issue an alert to the console/your automation package if it has not started within the allowable time frame, or if you have the TWSemon product from APS you can set up an alert in there. |
|
Back to top |
|
|
|