Page 1 of 1

Run a particular step N times.

PostPosted: Thu Jul 03, 2014 5:02 pm
by rajaranganathan
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.



Thanks
Raja.R

Re: Run a particular step N times.

PostPosted: Thu Jul 03, 2014 6:13 pm
by Akatsukami
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.

Re: Run a particular step N times.

PostPosted: Thu Jul 03, 2014 7:54 pm
by Robert Sample
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.