View previous topic :: View next topic
|
Author |
Message |
nitin_agr
New User
Joined: 06 Sep 2005 Posts: 28 Location: Minneapolis US
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
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 |
|
|
nitin_agr
New User
Joined: 06 Sep 2005 Posts: 28 Location: Minneapolis US
|
|
|
|
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 |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 419 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
no loops in jcl
rexx maybe useful in solving the looping and gdg creation |
|
Back to top |
|
|
|