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

Commom members in 2 different PDS


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Srilaxmi.Challa

New User


Joined: 19 Oct 2006
Posts: 6

PostPosted: Fri Sep 28, 2007 6:47 pm
Reply with quote

Hi ,

I would like to list out the commomn memmers in 2 PDS..
Can anybody pls help me out..

Byee
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 Sep 28, 2007 7:07 pm
Reply with quote

Common how? By name only, by content, or by both? Do aliases need to be considered as well?

If you wanted to find the common member names, I'd think the easiest process to do is to list all the members of each PDS, then process both lists together, keeping the dupes and tossing the non-dupes. You could also run the two lists through SUPERC and get the results that way.
Back to top
View user's profile Send private message
Srilaxmi.Challa

New User


Joined: 19 Oct 2006
Posts: 6

PostPosted: Fri Sep 28, 2007 8:57 pm
Reply with quote

Common by name only...

I need the Comparision technique using REXX...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Sep 28, 2007 9:07 pm
Reply with quote

Hello,

Using REXX you would do as Kevin suggests - the difference is you would write rexx code to compare the lists rather than using already-existing tools (like superc). There is no "rexx comparison technique" - it is just more code that one writes for one's requirement.
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 Sep 28, 2007 9:30 pm
Reply with quote

The methods above would work just as well. However, seeing how we're now talking about using REXX, I see where comparing stem variables may be of value:

Code:

/* REXX */
...                                         
Do outer = 7 To ml1.0                     
  mem1 = Space(ml1.outer,0)               
  match = 0                               
  Do inner = 7 To ml2.0                   
    mem2 = Space(ml2.inner,0)             
    If mem1 = mem2 Then                   
      Do                                 
        match = 1                         
        Leave inner                       
      End                                 
  End                                     
  If match Then Say mem1 " = " mem2       
End                                       
...


This presumes that the stem variable ml1. contains the member list of the first PDS, and ml2. contains the member list of the second PDS.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sat Sep 29, 2007 12:14 am
Reply with quote

SUPERC can produce a list of same-name members in two PDSs. You can invoke SUPERC from within REXX.

O.
Back to top
View user's profile Send private message
Srilaxmi.Challa

New User


Joined: 19 Oct 2006
Posts: 6

PostPosted: Sat Sep 29, 2007 3:20 pm
Reply with quote

Hi Kevin,

Its working...thx a lottt
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts REXX editmacro to compare two members... CLIST & REXX 7
No new posts Easy way to delete selected members f... IBM Tools 12
No new posts To find an array of words (sys-symbol... JCL & VSAM 9
Search our Forums:

Back to Top