Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

To list Out All the Members Of a PDS Using REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
dream4deepak

New User


Joined: 20 Jul 2006
Posts: 12

PostPosted: Thu Sep 28, 2006 3:13 pm    Post subject: To list Out All the Members Of a PDS Using REXX
Reply with quote

Hi ,
My requirement is
1. To list out all members of a PDS
2. Find for a word in side the Content of member(this process has to be carried out for all members)

I need to do this in REXX with out using IEBPTPCH utility .
Can you please help me with the Code...........




Thnks in Advance.
Deep
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Sep 28, 2006 3:21 pm    Post subject:
Reply with quote

I can't give you the code, but I can help you writing your own code.

To list all members, you can use:
1. The TSO command LISTDS with the MEMBERS parameter. Trap the output and process it.
2. ISPF service LMMLIST.

When you have a member list, use the ISPF service EDIT or VIEW with the MACRO parameter. Use this edit macro to search your word.

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

New User


Joined: 20 Jul 2006
Posts: 12

PostPosted: Thu Sep 28, 2006 3:30 pm    Post subject:
Reply with quote

Can You please tell me how to use the ISPF service LMMLIST .
How can i use the ISPF service EDIT with MACRO Parameter ?

I am totally new to this, so i m not aware this EDIT macros and the way of using it. please help in with some ex. codes for this Macros.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Sep 28, 2006 3:59 pm    Post subject:
Reply with quote

I strongly recommend to start by reading the manuals. There are many examples in the fine manuals.

To learn about ISPF services, please refer to ISPF Services Guide.
To learn about ISPF editor, including Edit-Macro, please refer to ISPF Edit and Edit Macros.

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

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Thu Sep 28, 2006 6:57 pm    Post subject: Re: To list Out All the Members Of a PDS Using REXX
Reply with quote

What not use a standard ISRSUPC (Super-C) search of the PDS, if all you want to do is find out what members contain a particular word?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Sep 28, 2006 9:11 pm    Post subject:
Reply with quote

Sometime you need complex searches to be done. Sometimes you need to replace a value in all members etc.

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

New User


Joined: 08 Dec 2005
Posts: 9

PostPosted: Sat Sep 30, 2006 11:54 am    Post subject: Re: To list Out All the Members Of a PDS Using REXX
Reply with quote

code will go something like this.......

Code:

/*rexx*/
pdsname = 'HLQ.some.thing'

x = outtrap(stem.)
"listds '"pdsname"' members"
x = outtrap(off)

do i = 7 to stem.0 /* 1 to 6 contains info abt the pds */
  member = strip(stem.i)
  dset = pdsname||'('||member||')'
  /* macronm is the macro which will find strings */
  ADDRESS ISPEXEC "edit dataset("dset") macro(macronm)"
end
exit
/************************************/
Back to top
View user's profile Send private message
snpavithra

New User


Joined: 22 Sep 2006
Posts: 9

PostPosted: Tue Oct 10, 2006 6:08 pm    Post subject:
Reply with quote

Code:

/* REXX */
RESULT.=''
FILE='ABC.TRAINING.PDS'
X=OUTTRAP("RES.")
ADDRESS TSO "LISTDS ('"FILE"') MEMBERS"
X=OUTTRAP("OFF")
       DO I = 7 TO RES.0
         RES.I = STRIP(RES.I)
         SAY
         SAY "CONTENT OF MEMBER : " RES.I
         DS = FILE || "(" || RES.I || ")"
       END
EXIT


This would list all the members of the given pds
Back to top
View user's profile Send private message
dream4deepak

New User


Joined: 20 Jul 2006
Posts: 12

PostPosted: Tue Oct 10, 2006 7:04 pm    Post subject:
Reply with quote

Thank 'u All
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us