MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Picking limited members of a PDS among many in a PDS
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
kedarnath
Beginner


Joined: 01 Sep 2003
Posts: 5
Topics: 1

PostPosted: Mon Sep 01, 2003 5:52 am    Post subject: Picking limited members of a PDS among many in a PDS Reply with quote

Hi guys,
I have a dataset containing 2000 members and i want to pick 1000 members among them...could anybody help me out in writing a jcl for this..
thanx in advance..

Regards,
kedarnath
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Mon Sep 01, 2003 7:09 am    Post subject: Reply with quote

Kedar,
And, do what with the 1000 members? You just want the names, or you want to use the select member names? Also, what is the selection criterion/a for the 1000 members?
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Mon Sep 01, 2003 7:31 am    Post subject: Reply with quote

I had sismilar requirement. I want to copy 1000 members out of 2000 from one PDS into another. These thousand names are available in an input file.
Back to top
View user's profile Send private message Send e-mail
kedarnath
Beginner


Joined: 01 Sep 2003
Posts: 5
Topics: 1

PostPosted: Mon Sep 01, 2003 8:06 am    Post subject: Reply with quote

Hi,
Yes i want to copy the members ie around 1000 members but i do not want to give it using the select clause as it is cumbersome is there any other way we can give it ie something like giving the memeber names in a member of pds and give this as a input to copy from one PDS to another PDS
Back to top
View user's profile Send private message
Brian
Beginner


Joined: 12 Aug 2003
Posts: 95
Topics: 6

PostPosted: Tue Sep 02, 2003 12:44 am    Post subject: Reply with quote

If you have fileaid in your shop it is pretty easy. Are the members that you want to copy in sequence or are they scattered.

FileAid supports wild cards while selecting members. For example

Code:


$$DD01 PRINT MEMBERS=AB---P-T



would select all members that begin with AB and have a P in position 6 and a T in position 8. If your requirement is something of this sort then a copy operation can be performed.
Back to top
View user's profile Send private message
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Tue Sep 02, 2003 12:52 am    Post subject: Reply with quote

Kedarnath,

Can you please elaborate on the selection criterion for the 1000 members or do you want to copy the first 1000 members or do you want to copy the last 1000 members or copy the members based on some wildcards as Brian had shown.

Cheers,
Coolman.
________
vaporizer affiliate programs


Last edited by coolman on Sat Feb 05, 2011 1:28 am; edited 1 time in total
Back to top
View user's profile Send private message
kedarnath
Beginner


Joined: 01 Sep 2003
Posts: 5
Topics: 1

PostPosted: Tue Sep 02, 2003 5:41 am    Post subject: Reply with quote

Thanx Brian & coolman
Well Brian as told by u we can use fileaid if the members were in some specific format but i have members which are not in sequence , i can say as it is haphazard and there is no specifice similarities in the member names..so that is the problem ..well could it be done something like this..ie giving the filenames in a memeber of PDS and giving this as input...plz help me out
Back to top
View user's profile Send private message
Brian
Beginner


Joined: 12 Aug 2003
Posts: 95
Topics: 6

PostPosted: Tue Sep 02, 2003 6:56 am    Post subject: Reply with quote

Kedar,

Some condition atleast. Are there any record level similarities across members that are to be copied. Some standout lines in the members that cause it to be different from other members. Just check it out and let us know the criteria.
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Tue Sep 02, 2003 7:20 am    Post subject: Reply with quote

Kedar,
You mean to say, the selection is already done and they are in a member of the PDS in a question?
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
Brian
Beginner


Joined: 12 Aug 2003
Posts: 95
Topics: 6

PostPosted: Tue Sep 02, 2003 8:15 am    Post subject: Reply with quote

Kedar

I can give you a very dirty solution. Assuming that all the member names that you want to copy are present in a PS you can copy all those members to a different PDS using this slick piece of code.

Firstly edit that member and reposition all the members to start from column position 19. Use the line commands

Code:

)) and ))19


to reposition them.

Once this is done column positions 1 - 18 are blanks. We will be using this space to write our fileaid control card information.

Then key in this command

Code:

c p' ' all '$$DD01 COPY MEMBER=' 1


After this the member should look something like this

Code:

$$DD01 COPY MEMBER=MEMA
$$DD01 COPY MEMBER=MEMB
$$DD01 COPY MEMBER=MEMC
$$DD01 COPY MEMBER=MEMD
$$DD01 COPY MEMBER=MEME
$$DD01 COPY MEMBER=MEMF


After this code your JCL to copy these members.

Code:

//JOB CARD INFORMATION
//FILEAID    EXEC PGM=FILEAID,REGION=2M
//SYSPRINT  DD   SYSOUT=*
//SYSLIST    DD   SYSOUT=*
//DD01        DD   DSN=INPUT.PDS.NAME,DISP=SHR
//DD01O      DD   DSN=OUTPUT.PDS.NAME,DISP=SHR
//SYSIN       DD   DSN=MEMBERS.NAME.PS,DISP=SHR
//*


Try it out and let us know the results.

cheers
Mr Brian.
Back to top
View user's profile Send private message
kedarnath
Beginner


Joined: 01 Sep 2003
Posts: 5
Topics: 1

PostPosted: Tue Sep 02, 2003 8:18 am    Post subject: Reply with quote

Hi Guys,
Well it is something like this I have 2000 programs and i want to pick around 1000 programs whose program names are in a memeber of PDS....I dont know what type of selection criteria BRIAN is looking for...as these are programs what should I give ??. Is there any way to pick these 1000 programs..as i have already told there are no specific programs names ie they are not starting with same characters or something like that they are totally different names...

Thanx in advance
Back to top
View user's profile Send private message
kedarnath
Beginner


Joined: 01 Sep 2003
Posts: 5
Topics: 1

PostPosted: Tue Sep 02, 2003 8:23 am    Post subject: Reply with quote

Thanx Brian..
Though it was crude method of doing it..it solved my problem...thank u very much
Back to top
View user's profile Send private message
petluri
Beginner


Joined: 05 Dec 2002
Posts: 19
Topics: 5
Location: Virginia, USA

PostPosted: Tue Sep 02, 2003 1:37 pm    Post subject: Reply with quote

why don't you try save as ..which will save all the members in that pds in to another Seq dataset. userid.as.members. And you can EDIT this dataset to create Copy commands

-sreeni
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue Sep 02, 2003 3:01 pm    Post subject: Reply with quote

kedarnath,
The following JCl will give you the desired results. A brief explanation of the Job. As you already stated that you have member names to be copied in a pds as a seperate member.
Step0100 takes in that member and creates control cards for IEBCOPY.The output from step100 will be as follows
Code:

 SELECT MEMBER=MEM1
 SELECT MEMBER=MEM2
....
 SELECT MEMBER=MEM1000


Now step0200 takes in this file as input and creates a new pds with all the members to be copied.

Code:
 
//STEP0100  EXEC  PGM=SORT                                           
//SYSOUT    DD SYSOUT=*                                             
//SORTIN    DD DSN=YOUR.PDS(MEMBER LIST),                       
//             DISP=SHR                                             
//SORTOUT   DD DSN=&L,DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(2,2),RLSE)
//SYSIN     DD *                                                     
 SORT FIELDS=COPY                                                   
 OUTREC FIELDS=(C' SELECT MEMBER=',1,8,80:X)                         
//*                                                                 
//STEP0200  EXEC PGM=IEBCOPY                                           
//SYSPRINT  DD SYSOUT=*                                             
//I1        DD DSN=YOUR.INPUT.PDS,                                 
//             DISP=SHR                                             
//O1        DD DSN=YOUR NEW PDS,                                     
//             DISP=(NEW,CATLG,DELETE),                             
//             UNIT=SYSDA,                                           
//             SPACE=(CYL,(X,Y,Z),RLSE),                           
//             DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)                     
//SYSIN     DD *                                                     
 COPY OUTDD=O1,INDD=((I1,R))                                         
//          DD DSN=&L,DISP=OLD
//*


While creating a pds you also need to specify the directory blocks. Each directory block can contain about a max of 5 members.So for thousand members you atleast need 200 directory blocks.

Code:

SPACE=(CYL,(X,Y,Z),RLSE)       

Here X = Primary Allocation in Cyls
     Y = Secondary Allocation in Cyls                     
     z = No: directory blocks


Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Tue Sep 02, 2003 11:34 pm    Post subject: Reply with quote

Very Happy Smile Laughing Rolling Eyes Wink Another dirty solution (this will fail if source or destination PDS doesn't exist) :

Code:

/*    REXX pgm to copy a list of pgms. */                           
 msg_stat = MSG('OFF')                                               
/* Allocate input file and read member names */                     
 "alloc DA('input.member.list') F(MEMBERS) SHR REUSE"               
 "EXECIO * DISKR MEMBERS (STEM member. FINIS"                       
 "FREE MEMBERS"                                                     
 do i = 1 to member.0                                               
  "REPRO IDS('input.pds('member.i')') ODS('output.pds('member.i')')"
 end                                                                 
 say "Thanks for copying "member.0" members using Diba's tool"; exit

Diba
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group