Run a particular step N times.

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Run a particular step N times.

Postby rajaranganathan » Thu Jul 03, 2014 5:02 pm

Hi All,

I have a requirement that where i need to run a particular step to re-run again based on its return code for a N number of times.

For example:
I have a proc which has 5 steps and the 5th step is performing a FTP and its failes due to some network problem but i want to re-run the full PROC 3 times (or )
the 5th step alone to re-submit for 3 times based on its return code. from JCL and nothing to alter in the PROC as its a generic one used in many places.

kindly let me know the options or suggestion to make this. Thanks in advance.

Posts: 27
Joined: Thu Oct 10, 2013 6:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Run a particular step N times.


Re: Run a particular step N times.

Postby Akatsukami » Thu Jul 03, 2014 6:13 pm

Can't be done through "JCL". Possibilities include using your job scheduler, using Rexx to resubmit the job, or encapsulating the desired functionality in Rexx and looping based on the return code and a counter. Another possibility is to find your network administrator and backhanding the lazy little fish nugget until he agrees to fix the network problem.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Global moderator
Posts: 996
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 48 times

Re: Run a particular step N times.

Postby Robert Sample » Thu Jul 03, 2014 7:54 pm

JCL is a VERY limited programming language -- it does not support loops and it has only a very limited IF statement. As stated, what you want to do cannot be done purely through JCL although there are other ways to accomplish your goal.
Robert Sample
Global moderator
Posts: 3094
Joined: Sat Dec 19, 2009 8:32 pm
Location: Bellevue, Iowa
Has thanked: 1 time
Been thanked: 176 times

Return to JCL


  • Related topics
    Last post