Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
processing of multiple elements of a PDS thru JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: processing of multiple elements of a PDS thru JCL
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

Moderator Team Head


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

PostPosted: Fri May 12, 2006 6:35 pm    Post subject: Re: processing of multiple elements of a PDS thru JCL
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    Post subject: Re: processing of multiple elements of a PDS thru JCL
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    Post subject:
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: 256
Location: Cincinnati OH USA

PostPosted: Sun May 14, 2006 7:37 pm    Post subject:
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    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 Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts Updating multiple counts in trailer!! Vignesh Sid SYNCSORT 4 Mon Nov 06, 2017 1:04 pm
No new posts Selecting a row from multiple tables! Vignesh Sid DB2 2 Thu Oct 26, 2017 6:09 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us