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

To list Out All the Members Of a PDS Using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 2358
Location: Israel

PostPosted: Thu Sep 28, 2006 3:21 pm
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
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: 2358
Location: Israel

PostPosted: Thu Sep 28, 2006 3:59 pm
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
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: 2358
Location: Israel

PostPosted: Thu Sep 28, 2006 9:11 pm
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top