Can we make a job step to run multiple times ?



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

Can we make a job step to run multiple times ?

Postby sugavanesh » Fri Feb 17, 2012 12:48 pm

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 ...
sugavanesh
 
Posts: 9
Joined: Sat Nov 05, 2011 9:03 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby BillyBoyo » Fri Feb 17, 2012 1:05 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

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

Postby sugavanesh » Fri Feb 17, 2012 2:10 pm

I looked at the reference manual .... But couldnt find anything .... could you tel me which one do I need to refer .....
sugavanesh
 
Posts: 9
Joined: Sat Nov 05, 2011 9:03 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby BillyBoyo » Fri Feb 17, 2012 2:16 pm

So, if you can't find anything, how about suspecting it can't be done?

What about my other suggestion?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

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

Postby expat » Fri Feb 17, 2012 6:07 pm

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.
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

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

Postby Akatsukami » Fri Feb 17, 2012 6:17 pm

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.
"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
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

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

Postby NicC » Fri Feb 17, 2012 6:36 pm

Actually, he should hand it over to someone who knows JCL.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

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

Postby Anuj Dhawan » Sat Feb 18, 2012 1:06 pm

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".
Anuj
Anuj Dhawan
 
Posts: 273
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post