Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
End the job into error / abend state

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
wik123

New User


Joined: 13 Jul 2018
Posts: 7
Location: Nederlands

PostPosted: Wed Sep 11, 2019 6:37 pm    Post subject: End the job into error / abend state
Reply with quote

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
View user's profile Send private message

steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 762
Location: The Universe

PostPosted: Wed Sep 11, 2019 7:14 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2300
Location: NY,USA

PostPosted: Wed Sep 11, 2019 7:42 pm    Post subject:
Reply with quote

This may be what you need. If not then suggest you to see Scheduling documentation that your site has to know possible options within scheduler.
Scheduling Tips: Querying the Status of Work in Progress via LISTSTAT in BATCH
Quote:
As per my understand TIME parameter we can use only when if its executing phase.
Yes.TIME parameter
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 194
Location: UK

PostPosted: Wed Sep 25, 2019 4:29 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 Block insert (-803 Error Handling) NJDevils28 COBOL Programming 5 Mon Nov 11, 2019 7:54 pm
No new posts Abend S000 U0000 REASON=00000000 Uday Kumar Thota IMS DB/DC 3 Wed Oct 30, 2019 8:43 pm
No new posts Not seeing the error panel )ATTR Harold Barnes TSO/ISPF 4 Fri Sep 20, 2019 10:56 am
No new posts WER027A Error Chinnadu SYNCSORT 8 Thu Aug 29, 2019 11:58 am
No new posts ISRE771 error while invoking macros pkmurali CLIST & REXX 5 Mon Aug 26, 2019 7:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us