Page 1 of 1

Can we make a job step to run multiple times ?

PostPosted: Fri Feb 17, 2012 12:48 pm
by sugavanesh
I have a Job that needs to create hundred datasets, and that hundred datasets needs to be used as a input file to next step .... Is there a way for looping in jcl, so that I can create a single dataset each time and that can be used as input file for the next step, so that the job can run hundred times ... or please tell me some other solution ...

Re: Can we make a job step to run multiple times ?

PostPosted: Fri Feb 17, 2012 1:05 pm
by BillyBoyo
Have a look at the JCL reference manual. Always a good idea when you want to know what is possible in JCL. You'll learn far more that way than someone just coughing-up the answer.

You have to be much, much, clearer about what you are doing and want to do for anyone to provide any good ideas.

Re: Can we make a job step to run multiple times ?

PostPosted: Fri Feb 17, 2012 2:10 pm
by sugavanesh
I looked at the reference manual .... But couldnt find anything .... could you tel me which one do I need to refer .....

Re: Can we make a job step to run multiple times ?

PostPosted: Fri Feb 17, 2012 2:16 pm
by BillyBoyo
So, if you can't find anything, how about suspecting it can't be done?

What about my other suggestion?

Re: Can we make a job step to run multiple times ?

PostPosted: Fri Feb 17, 2012 6:07 pm
by expat
sugavanesh wrote:I have a Job that needs to create hundred datasets, and that hundred datasets needs to be used as a input file to next step .... Is there a way for looping in jcl, so that I can create a single dataset each time and that can be used as input file for the next step, so that the job can run hundred times ... or please tell me some other solution ...

HUH ????

Why do you want to split a dataset into hundres of datasets and then process those same hundreds of datasets in the next step.
You need to detail what is happening, why it is happening, and how this affects you requirement.

Re: Can we make a job step to run multiple times ?

PostPosted: Fri Feb 17, 2012 6:17 pm
by Akatsukami
expat wrote:
sugavanesh wrote:I have a Job that needs to create hundred datasets, and that hundred datasets needs to be used as a input file to next step .... Is there a way for looping in jcl, so that I can create a single dataset each time and that can be used as input file for the next step, so that the job can run hundred times ... or please tell me some other solution ...

HUH ????

Why do you want to split a dataset into hundres of datasets and then process those same hundreds of datasets in the next step.
You need to detail what is happening, why it is happening, and how this affects you requirement.

Probably he wrote poorly enough to obscure what he wants to do. It would seem that what he wants (and note that I do not claim that it is possible) is about like:
//         DO     I=1 TO 100
//LOOP     EXEC   PGM=FOO
//IN       DD     DSN=BAR(0),DISP=SHR
//OUT      DD     DSN=BAR(+1),DISP=(NEW,CATLG,DELETE),LIKE=BAR(0)
//         ENDDO

The TS should either learn Rexx, or hand this task over to someone who already knows it.

Re: Can we make a job step to run multiple times ?

PostPosted: Fri Feb 17, 2012 6:36 pm
by NicC
Actually, he should hand it over to someone who knows JCL.

Re: Can we make a job step to run multiple times ?

PostPosted: Sat Feb 18, 2012 1:06 pm
by Anuj Dhawan
sugavanesh wrote:I have a Job that needs to create hundred datasets, and that hundred datasets needs to be used as a input file to next step .... Is there a way for looping in jcl, so that I can create a single dataset each time and that can be used as input file for the next step, so that the job can run hundred times ... or please tell me some other solution ...
JCL itself can't provide you the capability of loop. Possibly, you can create a PROC, use symbolic name for the DSN you want to change every time and use this PROC "intelligently".