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

processing of multiple elements of a PDS thru JCL


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

New User


Joined: 06 Sep 2005
Posts: 28
Location: Minneapolis US

PostPosted: Fri May 12, 2006 4:50 pm
Reply with quote

Hi,
I have following query:

I have many elements (aprx 1000) in a PDS. Now I want to create GDG bases for each of them having a specific pattern e.g.

Element names are : ELEMNT1, ELEMNT2, ELEMNT3 and so on
GDG base name will be: USERID.APPL123.ELEMNT1
USERID.APPL123.ELEMNT2 etc..

I want to use any method by which I can read each element name from PDS and able to append in the GDG name. It will reduce lots of headache else I will have to code 1000 such steps to create bases.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri May 12, 2006 6:35 pm
Reply with quote

1. Create the list of members.
2. For each member, create an IDCAMS CREATE GDG record.
3. Run IDCAMS.

or

1. Create the list of members.
2. For each member, create and execute a TSO DEFGDG command.

Am I missing something here??
Back to top
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Fri May 12, 2006 9:19 pm
Reply with quote

I agree with superk

I shouldn't take too much effort or imagination to get a list of member names , use IEHLIST for example
and then from the output, using either Sort or even your editor to create 1000 of these

DEF GDG(NAME(USERID.APPL123.ELEMNT1) LIMIT(255)
DEF GDG(NAME(USERID.APPL123.ELEMNT2) LIMIT(255)
DEF GDG(NAME(USERID.APPL123.ELEMNT3) LIMIT(255)

and use as IDCAMS commands
Not sure if there is a limit to number of commands and I ain't about to test it!
Back to top
View user's profile Send private message
nitin_agr

New User


Joined: 06 Sep 2005
Posts: 28
Location: Minneapolis US

PostPosted: Sun May 14, 2006 11:43 am
Reply with quote

Thanks for the quick response.
I agree with you ppl, absolutely I can do in that manner.

But I wanted to know whether I can do the same thing in a very few steps only. I mean can we put some kind of loop in jcl which will read each of member name from pds and will genrate a GDG as per the defined format.
Offcourse there is not any kind of loopin facilyt in JCL but can we create a loop in a few steps using if.. else and will that solve my purpose.
Because I think there must be some way to reduce this cumbersome excercise.
Pls correct me if I am making any wrong assumption....

Nitin
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Sun May 14, 2006 7:37 pm
Reply with quote

no loops in jcl

rexx maybe useful in solving the looping and gdg creation
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top