Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Run JCL to execute a step for all versions of GDGs.
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: 1703
Location: Australia

PostPosted: Fri Apr 24, 2009 11:33 am    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Apr 24, 2009 11:44 am    Post subject:
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    Post subject: Reply to: Run JCL to execute a step for all versions of GDGs
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 24, 2009 11:54 am    Post subject:
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    Post subject:
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

http://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    Post subject:
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

Site Director


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

PostPosted: Fri Apr 24, 2009 8:19 pm    Post subject:
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: 1239
Location: Richfield, MN, USA

PostPosted: Sat Apr 25, 2009 8:32 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts execute APP if they are not ADDRESS T... italo_pm CLIST & REXX 3 Fri Aug 12, 2016 2:15 am
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
No new posts Execute multiple DB2 Load commands in... faizm DB2 4 Wed Aug 03, 2016 12:53 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us