How to Execute 1 Step of JCL more than 1 time ?



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

How to Execute 1 Step of JCL more than 1 time ?

Postby denis.dhimitri » Fri May 09, 2008 2:25 pm

Hello Mr.Yaeger,

I'm here again with a new question for you. I've to build a JCL which has to execute the second STEP for n-times where n = number of OUTPUT files of the first STEP that creates them dynamically. How can I do something like this ? I mean how can I loop in the second STEP of my JCL ? Thanks in advance.

Regards
Denis Dhimitri
denis.dhimitri
 
Posts: 11
Joined: Sat Feb 09, 2008 9:11 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to Execute 1 Step of JCL more than 1 time ?

 

Re: How to Execute 1 Step of JCL more than 1 time ?

Postby CICS Guy » Fri May 09, 2008 6:20 pm

denis.dhimitri wrote:I've to build a JCL which has to execute the second STEP for n-times where n = number of OUTPUT files of the first STEP that creates them dynamically. How can I do something like this ? I mean how can I loop in the second STEP of my JCL ?
Step one can create (almost) any number of step twos, but those steps will be executed in another JOB (or JOBs).
You can't loop within a job.
CICS Guy
 
Posts: 255
Joined: Wed Jun 20, 2007 4:08 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to Execute 1 Step of JCL more than 1 time ?

Postby Frank Yaeger » Fri May 09, 2008 8:53 pm

This is not a DFSORT question. I'm moving it to the JCL Forum so somebody else can answer it (I'm an expert on DFSORT, but not on JCL).
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: How to Execute 1 Step of JCL more than 1 time ?

Postby William Thompson » Sat May 10, 2008 12:58 am

denis.dhimitri wrote:I've to build a JCL which has to execute the second STEP for n-times where n = number of OUTPUT files of the first STEP that creates them dynamically. How can I do something like this ? I mean how can I loop in the second STEP of my JCL ?
Like CG said, not within the same job.
You could use REXX, COBOL or Sort to create the JCL for the following variable job.
You may be remembering cases where one sort/tool step created input data for a second step, but I've never seen JCL created for a second step.
William Thompson
 
Posts: 86
Joined: Sat Jun 09, 2007 4:24 am
Location: Tucson AZ
Has thanked: 0 time
Been thanked: 1 time

Re: How to Execute 1 Step of JCL more than 1 time ?

Postby jayind » Mon May 12, 2008 4:18 pm

To my knowledge and FYI...

JCL is a fall through of executable statements... Its kind of interpreter and execution. You cant go back to re-execute some step that already either executed or by passed in the process of fall through. This can happen only creating another JCL with so many steps using COBOL or REXX and submit as successor to the current JCL. Hope this helps....
jayind
 
Posts: 62
Joined: Wed Apr 23, 2008 1:37 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post