Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

consideration for restarted jobs:help needed

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

Active User


Joined: 05 Oct 2006
Posts: 141

PostPosted: Fri Mar 07, 2014 3:39 pm    Post subject: consideration for restarted jobs:help needed
Reply with quote

hi,

i have coded if and else statement inside the job.based on the return code
i will decide whether to invoke existing process or new process
if i set maxcc=1 existing process will be invoked.if i set maxcc=0 new process will be invoked.

During testing I encountered a B37 abend in step step3. Following the restart instructions, I restarted the job at step2 but all the steps flushed because the IF condition is evaluated as false. how can we handle this??

please find the below details



Code:
//step1    EXEC PGM=IDCAMS,COND=(4,LT)   
//SYSIN    DD   *                       
 SET MAXCC=0                             
//SYSPRINT DD   SYSOUT=*                 
//*                                     
//  IF (step1.RC = 0) THEN
//STEP2  EXEC PGM=IDCAMS,COND=(4,LT)                             
                                                               
//STEP3  EXEC PGM=IEFBR14,COND=(4,LT)

//STEP4  EXEC PGM=IEFBR14,COND=(4,LT)
 
//  END-IF 

/  IF (step1.RC = 1) THEN
//STEP5  EXEC PGM=IDCAMS,COND=(4,LT)                             
                                                               
//STEP6  EXEC PGM=IEFBR14,COND=(4,LT)

//STEP7  EXEC PGM=IEFBR14,COND=(4,LT)
 
/  END-IF 


how can we handle this without editing the jcl??

Regds,
useit
Back to top
View user's profile Send private message

David Robinson

Active User


Joined: 21 Dec 2011
Posts: 175
Location: UK

PostPosted: Fri Mar 07, 2014 5:17 pm    Post subject:
Reply with quote

You can change the IF statement so that it will run in the event that an earlier specified step did not, so you can restart from within a IF/THEN section. The problem in this case is that you'd have to code this on both IF statements and if you restarted from STEP3 it would then also run STEP5 - STEP7.

I would be inclined to redesign your job so that it can be rerun from the top.

Failing that, if you use TWS this can handle this situation for you by manipulating the JES control blocks on a rerun to simulate the return codes from an earlier failed job. Possibly other schedulers have similar features.
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Mon Mar 10, 2014 10:34 am    Post subject:
Reply with quote

Which Job Scheduler do you use?.
Back to top
View user's profile Send private message
useit

Active User


Joined: 05 Oct 2006
Posts: 141

PostPosted: Mon Mar 10, 2014 1:58 pm    Post subject: Reply to: consideration for restarted jobs:help needed
Reply with quote

hi,
we use CA7 scheduler

Regds,
useit
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Mar 10, 2014 2:29 pm    Post subject: Reply to: consideration for restarted jobs:help needed
Reply with quote

for jobs under scheduler control most probably the safest way is to use the old COND approach
unless something has changed lately schedulers do not deal well with the IF construct
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Tue Mar 11, 2014 3:52 am    Post subject:
Reply with quote

Quote:
how can we handle this without editing the jcl??


And why is that a requirement, what will happen if you edit it? as I believe this is a local unit testing for you and a alternate way of doing it is already mentioned by David?
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 How to show message using batch jobs madprasy TSO/ISPF 7 Fri Sep 09, 2016 6:55 pm
No new posts Don't allow CICS to submit batch jobs prino JCL & VSAM 5 Mon Jul 25, 2016 3:26 pm
No new posts Help Needed with View Direct shailesh_do CA Products 2 Wed Jul 13, 2016 10:39 am
No new posts Predicting jobs which are about to re... kpanchabhai85 DFSORT/ICETOOL 4 Thu Jun 30, 2016 7:51 pm
No new posts How to find jobs that are in schedule... anilkumar922 All Other Mainframe Topics 5 Tue Jun 28, 2016 10:01 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us