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
 
How to search a member in PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
VIKAS GAIKWAD

New User


Joined: 30 Nov 2006
Posts: 33
Location: MUMBAI

PostPosted: Mon Mar 26, 2007 7:28 pm    Post subject: How to search a member in PDS
Reply with quote

How to search a member in PDS?

I have got around 100 members, which needs to be search in PDS having members more than 6000.

Which is JCL utility provided for this & let me know the Syantax for the same.
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: Mon Mar 26, 2007 7:32 pm    Post subject:
Reply with quote

Quote:
How to search a member in PDS?

Do you mean that you want to search for the name of a member in a PDS, or that you want to search the contents of a member for a given string ?
Back to top
View user's profile Send private message
VIKAS GAIKWAD

New User


Joined: 30 Nov 2006
Posts: 33
Location: MUMBAI

PostPosted: Mon Mar 26, 2007 7:41 pm    Post subject: How to search a member in PDS?
Reply with quote

I want to search name of the members in PDS. I don't want to search contents.
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: Mon Mar 26, 2007 7:45 pm    Post subject:
Reply with quote

LISTPDS as shown in the Utilities manual will give you the contents of a PDS. You can then possibly process the output from this via REXX to tell you what you want.
Back to top
View user's profile Send private message
VIKAS GAIKWAD

New User


Joined: 30 Nov 2006
Posts: 33
Location: MUMBAI

PostPosted: Mon Mar 26, 2007 7:48 pm    Post subject:
Reply with quote

Sorry, expat

I don't know rexx. I require JCL for this.
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: Mon Mar 26, 2007 7:54 pm    Post subject:
Reply with quote

LISTPDS will list out the members in a given PDS.

I suggested the REXX as a faster than eye scan to see which PDS contains the members you want to find. ALthough the members are listed alphbetically.
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: Mon Mar 26, 2007 8:13 pm    Post subject: Re: How to search a member in PDS
Reply with quote

All of these previous posts deal with finding member names of a PDS:

http://ibmmainframes.com/viewtopic.php?t=235
http://ibmmainframes.com/viewtopic.php?t=9831
http://ibmmainframes.com/viewtopic.php?t=13908
Back to top
View user's profile Send private message
VIKAS GAIKWAD

New User


Joined: 30 Nov 2006
Posts: 33
Location: MUMBAI

PostPosted: Tue Mar 27, 2007 5:59 pm    Post subject:
Reply with quote

Hi superK,

I tried out all the links you provided. But, No one satisfies me.

I already mentioned that, I have got around 100 members(which are in one ps say ABC), which needs to be search in PDS(say XYZ) having members more than 6000.

ex.The contents of ps is like

abc
xyz
lmn
opr
zjk

The members of PDS is like

a12
aqw
abc
xxx
xyz.

Now the result I require is in another PS whose contents as follows
abc
xyz


Which is JCL utility provided for this & let me know the Syntax for the same.

I tried out

//STEP10 EXEC PGM=IKJEFT01
//SYSTSPRT DD DSN=YOUR PDS MEM LISTING
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1,1),RLSE),
// UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSTSIN DD *
LISTDS 'your pds name'
MEMBERS(
abc)
/*

No desired output.

//STEPXXXX EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=MY.PDS
//SYSUT2 DD DSN=MY.SEQ,DISP=(,CATLG,DELETE),...
//SYSIN DD *
PUNCH TYPORG=PO
/*

It ran successfully, But I want only names of members which are exactly same in both ABC(ps) & in XYZ(PDS). Above JOB gives all contents.


Again I tried for following.

//STEPXXXX EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=MY.PDS
//SYSUT2 DD DSN=MY.SEQ,DISP=(,CATLG,DELETE),...
//SYSIN DD *
PUNCH TYPORG=PO,MAXNAME=N
MEMBER NAME=member1
MEMBER NAME=member2
...............
...............
MEMBER NAME=memberN

/*


Which gives MAXCC12. I think due to syntax.
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: Tue Mar 27, 2007 6:04 pm    Post subject:
Reply with quote

As I said earlier, you will need to produce some type of logic to cross reference which members are in the PDS.

You can use the output from LISTPDS and the PS file.

REXX will be able to do this for you, and so will DFSORT. Look at the SORT forum, using the SPLICE command may be of a great help to you. In fact - it is exactly what you want.
Back to top
View user's profile Send private message
VIKAS GAIKWAD

New User


Joined: 30 Nov 2006
Posts: 33
Location: MUMBAI

PostPosted: Tue Apr 03, 2007 4:10 pm    Post subject:
Reply with quote

Quote:
Again I tried for following.

//STEPXXXX EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=MY.PDS
//SYSUT2 DD DSN=MY.SEQ,DISP=(,CATLG,DELETE),...
//SYSIN DD *
PUNCH TYPORG=PO,MAXNAME=N
MEMBER NAME=member1
MEMBER NAME=member2
...............
...............
MEMBER NAME=member


For above syntax the lines


PUNCH TYPORG=PO,MAXNAME=N
MEMBER NAME=member1
MEMBER NAME=member2
...............
...............
MEMBER NAME=member

it is better to after 8th column, otherwise it gives maxc 12.

Then use SORT on output file to get result.
Thanks SuperK.

You can use sort parameters like following

SORT FIELDS=COPY
INCLUDE COND=(1,7,CH,EQ,C'VMEMBER')
INREC FIELDS=(1:15,8)


Thanks,

Vikas
Back to top
View user's profile Send private message
VIKAS GAIKWAD

New User


Joined: 30 Nov 2006
Posts: 33
Location: MUMBAI

PostPosted: Tue Apr 03, 2007 4:34 pm    Post subject:
Reply with quote

Also for PUNCH TYPORG=PO,MAXNAME=N

MAXNAME=you can give value 1000 or 2000 or anything. But must be greater than number of members you are finding.



Thanks,

Vikas
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: Tue Apr 03, 2007 7:49 pm    Post subject:
Reply with quote

Hello,

You have a ps file with the member names you are interested in - that will be input 1. Create another file with all of the member names as recommended above - that will be input 2.

Make sure both files are in member-name order.

Using jcl and control statements, match the 2 files using the sort utility and create the output you want. Examples of what you want are available in the DFSORT forum once you have the 2 usable files.
Back to top
View user's profile Send private message
VIKAS GAIKWAD

New User


Joined: 30 Nov 2006
Posts: 33
Location: MUMBAI

PostPosted: Tue Apr 03, 2007 8:16 pm    Post subject:
Reply with quote

Hello,

I think solution given by you is Fine & also will take less time.

But then I will face following problem.

Quote:
Create another file with all of the member names as recommended above - that will be input 2.


Suppose I have one PDS having name ABC.XYZ(contaning 5000 members). So copying these member names to another dataset is tedious & second thing is the new mebers in PDS may be added or some may be get deleted after some time.
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: Tue Apr 03, 2007 8:38 pm    Post subject:
Reply with quote

Hello,

You don't need to do this manually - if you use LISTPDS, you will have your member names file created for you.

The pds will always have the potential to be added to and deleted from. That is just the nature of a pds. I do not believe it relates to matching the "hit" list to the current member names.
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
No new posts Copying a ps to member of a existing PDS Deepika Chikyala JCL & VSAM 10 Tue Sep 05, 2017 11:44 am
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Browsing member from any PDS shiitiizz CLIST & REXX 7 Wed Mar 08, 2017 1:17 am

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