MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Looping within JCL?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
stboerma
Beginner


Joined: 01 Dec 2003
Posts: 2
Topics: 1

PostPosted: Mon Dec 01, 2003 7:01 pm    Post subject: Looping within JCL? Reply with quote

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
View user's profile Send private message
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Mon Dec 01, 2003 11:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
stboerma
Beginner


Joined: 01 Dec 2003
Posts: 2
Topics: 1

PostPosted: Tue Dec 02, 2003 10:06 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Tue Dec 02, 2003 10:31 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Tue Dec 02, 2003 11:35 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Wed Dec 03, 2003 6:24 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Wed Dec 03, 2003 8:00 am    Post subject: Reply with quote

Thanks kolusu.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group