View previous topic :: View next topic |
Author |
Message |
stboerma Beginner
Joined: 01 Dec 2003 Posts: 2 Topics: 1
|
Posted: Mon Dec 01, 2003 7:01 pm Post subject: Looping within JCL? |
|
|
Hi.
I am curious if it is possible, within JCL to loop between steps.
I want to run Step1, Step2, then have Step 2 run over and over until I cancel the entire job.
Before you ask, I am a tester and need to stress the job which requires I run Step 2 over and over... |
|
Back to top |
|
 |
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Mon Dec 01, 2003 11:27 pm Post subject: |
|
|
A job is usually stressed by varying the input data. Even if you could "loop" thru step2 how would you vary the data?
You may be able to get the desired effect if you have Expediter. Change the I/P fields then restart from the top of the code.
You could also write a simple loader pgm that keeps CALLing your pgm, but the data is still the problem. How do you vary it?
I'm not sure I understand what you're trying to accomplish. |
|
Back to top |
|
 |
stboerma Beginner
Joined: 01 Dec 2003 Posts: 2 Topics: 1
|
Posted: Tue Dec 02, 2003 10:06 am Post subject: |
|
|
The stress that I need to accomplish doesn't require varying of the data... can't really go into it more than that.
I don't have Expediter...
I want to loop inside my JCL if at all possible... step1 --> step2 --> step3 --> step2
Thanks! |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
Posted: Tue Dec 02, 2003 10:31 am Post subject: |
|
|
stboerma,
You can loop thru JCL by submitting the same step to INTRDR.
This is your main JCL.
Code: |
//TIDXXXXA JOB 'MAIN JCL',
// CLASS=A,
// MSGCLASS=Y,
// MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//*
//STEP1 EXEC PGM=IEFBR14
//*
//....
//STEP2 EXEC PGM=YOUR PGM
...
//STEP3 EXEC PGM=IEBGENER
//SYSUT1 DD DSN=YOUR.PDS(LOOPJCL),
// DISP=SHR
//SYSUT2 DD SYSOUT=(*,INTRDR)
//SYSIN DD DUMMY
//SYSOUT DD SYSOUT=*
|
This is your LOOPJCL in your PDS. This will have just step2 and step3.
Code: |
//TIDXXXXA JOB 'LOOP JCL',
// CLASS=A,
// MSGCLASS=Y,
// MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//*
//STEP2 EXEC PGM=YOUR PGM
...
//STEP3 EXEC PGM=IEBGENER
//SYSUT1 DD DSN=YOUR.PDS(LOOPJCL),
// DISP=SHR
//SYSUT2 DD SYSOUT=(*,INTRDR)
//SYSIN DD DUMMY
//SYSOUT DD SYSOUT=*
|
Hope this helps...
cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Tue Dec 02, 2003 11:35 pm Post subject: |
|
|
Kolusu,
How will one stop the loop, especially if it is a small and quick job so that you don't get time to locate and cancel it.
One way could be probably to remove your.pds(LOOPJCL).
Any other solution?
Diba. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
Posted: Wed Dec 03, 2003 6:24 am Post subject: |
|
|
Dibakar,
You don't have to delete the PDS to stop the looping. You can just open the PDS for edit. So Edit the loopjcl member to have just the jobcard. or alternatively you can add a TYPRUN=HOLD to your loopjCl.you can then release the job as and when you like. check the following topic which discusses the release of jobs with TYPRUN=HOLD
http://www.mvsforums.com/helpboards/viewtopic.php?t=1316
Hope this helps...
cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Wed Dec 03, 2003 8:00 am Post subject: |
|
|
Thanks kolusu. |
|
Back to top |
|
 |
|
|