IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Run JCL to execute a step for all versions of GDGs.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
himanshusoni77

New User


Joined: 19 Jul 2007
Posts: 6
Location: pune

PostPosted: Fri Apr 24, 2009 11:31 am
Reply with quote

Hi, This is my first post to this site. I need help in solving following situation.

I have to write an easytrieve program to display Record counts of particular types of record in the input file. I have to do this to generate counts for past 3 weeks files. Input to this program is GDG file. So my question here is,

- Instead of changing input file GDG version number and resubmitting JCL for 15 times,
1. Can I loop my JCL to run for say 15 times?
2. For iteration/run it should pickup previous generation to current run. (Changing GDG version dynamically, say for 1 st run -1, for second run -2, for 3rd run -3 ...)
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Apr 24, 2009 11:33 am
Reply with quote

Hi,

the short answer is no.


Gerry
Back to top
View user's profile Send private message
himanshusoni77

New User


Joined: 19 Jul 2007
Posts: 6
Location: pune

PostPosted: Fri Apr 24, 2009 11:39 am
Reply with quote

Hi Gerry,

I could see many posts on looping in JCL which seems possible. So are you saying 'NO' to point 2. regarding GDGs?

Is there any other way to achieve this without manually submitting job for each version?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Apr 24, 2009 11:44 am
Reply with quote

Hi,

JCL cannot loop.

You coud have a proc and excute it 15 times ie. 15 steps or 15 separate jobs.

You will need to adjust the GDG number for each step or job.


Gerry
Back to top
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Fri Apr 24, 2009 11:48 am
Reply with quote

Himanshu Soni,
Can you copy the same step for 15 steps in one JCL by just changing the I/P(GDG Version) and O/P.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 24, 2009 11:54 am
Reply with quote

Yet again there is the transposition of the terms Version and Generation when the topic concerns GDS.

Please be aware that both terms are correct but have totally different meanings in context of a GDS.

It would be greatly appreciated if people could both learn and use the correct terminology in future
Back to top
View user's profile Send private message
himanshusoni77

New User


Joined: 19 Jul 2007
Posts: 6
Location: pune

PostPosted: Fri Apr 24, 2009 12:35 pm
Reply with quote

Hi Gerry,

Yes you are right, JCLs do not loop. What I meant by looping is resubmitting JCLs for n number of times using technique in below post

www.ibmmainframes.com/about2988.html

But i am not sure how can i use this for refering to various generations of GDG.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Fri Apr 24, 2009 7:13 pm
Reply with quote

If you were allowed to UNCATLG each file as it processed, The DSN(0) would be correct for each step until all are gone from the catalog.

Otherwise, you must change the DSN for each step and run 15 of them.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 24, 2009 8:19 pm
Reply with quote

Hello,

If you created a small PROCedure and defined a symbolic parameter for the generation, your execute could be as small as a JOB statement, the PROC/PEND, and 15 EXECs each with the proper generation. . .
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sat Apr 25, 2009 8:32 am
Reply with quote

Dick's suggestion is the way to go, in my opinion.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts Fetch data from programs execute (dat... DB2 3
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
Search our Forums:

Back to Top