IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

OPC rerun failed job


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Valdis Ozolins

New User


Joined: 09 Dec 2010
Posts: 1
Location: Leeds, West Yorkshire, England

PostPosted: Sat Dec 11, 2010 3:57 am
Reply with quote

In OPC, Is there a way to re run a failed job via a batch process? I have looked at the Control Language (OCL) & the Batch Command Interface Tool but can’t find a way to do this.
[/Search]
Back to top
View user's profile Send private message
KannanChinna

New User


Joined: 14 Feb 2011
Posts: 3
Location: Chennai

PostPosted: Tue Feb 15, 2011 10:15 pm
Reply with quote

sjr is the command to rerun a failed job that we see in 5.4 option

R command in 5.2 will be useful to rerun the application from the failed job...
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Feb 16, 2011 12:40 am
Reply with quote

What is this? Any job defined in OPC (or TWS) can be rerun. Read the manuals or get a good education.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Feb 16, 2011 2:46 pm
Reply with quote

Valdis,

dont pm me please. You could have put your pm here :

The question I asked was In OPC, Is there a way to re run a failed job via a BATCH process?
I now you can re run a job from the ISPF interface but this is not what I want. You can also rerun with an OPC RECOVER statement in the JCL but that only gives you one re run and it's instant.
We have some FTP jobs that ocasionaly fail for conection problems & usually a rerun after 2-3 mins works. So I use an MPF exit to trap the failed job and startr an STC to rerun the job in OPC, but there is NO command to do this This is possible on other scheduling platforms.

My response on your pm :

I guess you use system automation (trapping in MPF) if so, you trigger
a rexx in your message table and issue OPCAMOD, OPCAPOST or INGOPC commands within a timer.
see : OPC Automation Programmers Reference" SC33-7046-03

So everybode on this forum can learn from your questions and the answers you get from me and others.
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Thu Dec 29, 2011 4:21 pm
Reply with quote

This maybe a little late for the OP, but it's really very easy. The OPC RECOVER statement will do exactly what you require.

Firstly, your assertion that the OPC RECOVER statement only gives you one run is not entirely correct. Sure, it will only give you one rerun per RECOVER statement, as obviously you wouldn't want to continuously resubmit a job that was failing. But if you code multiple RECOVER statements, you will get multiple reruns. TWS will comment out one RECOVER statement on each rerun so it is ignored next time.

As for introducing a delay, the easiest way is to use the ADDPROC statement to add a proc containing a delay program in to your JCL. If you don't have a suitable delay program, use the TWS supplied EQQRETWM. You only need to code this on the first RECOVER statement, so the delay proc only gets added once. Alternatively use the ADDAPPL statement to add in a new application that contains a job running on a "wait" work-station which will be a predecessor to your failed job.

And you could if you wanted to rerun the job via your batch started task initiated from the MPF exit triggered by the failure message, but this all seems horribly compliacated.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts DFHPI1008 JSON generation failed COBOL Programming 0
No new posts DataSet member creation failed with B... Java & MQSeries 15
No new posts Very Large Sort failed - Seeking reco... DFSORT/ICETOOL 7
No new posts FTP - JCL failed while passing FTP co... JCL & VSAM 12
No new posts ABEND due to FETCH FAILED ABENDS & Debugging 17
Search our Forums:

Back to Top