View previous topic :: View next topic
|
Author |
Message |
himanshusoni77
New User
Joined: 19 Jul 2007 Posts: 6 Location: pune
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
the short answer is no.
Gerry |
|
Back to top |
|
|
himanshusoni77
New User
Joined: 19 Jul 2007 Posts: 6 Location: pune
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
|
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 171 Location: India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
himanshusoni77
New User
Joined: 19 Jul 2007 Posts: 6 Location: pune
|
|
|
|
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 |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Dick's suggestion is the way to go, in my opinion. |
|
Back to top |
|
|
|