View previous topic :: View next topic
|
Author |
Message |
dream4deepak
New User
Joined: 20 Jul 2006 Posts: 12
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
dream4deepak
New User
Joined: 20 Jul 2006 Posts: 12
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
Kevin
Active User
Joined: 25 Aug 2005 Posts: 234
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Sometime you need complex searches to be done. Sometimes you need to replace a value in all members etc.
O. |
|
Back to top |
|
|
princegaurav
New User
Joined: 08 Dec 2005 Posts: 9
|
|
|
|
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 |
|
|
snpavithra
New User
Joined: 22 Sep 2006 Posts: 9
|
|
|
|
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 |
|
|
dream4deepak
New User
Joined: 20 Jul 2006 Posts: 12
|
|
|
|
Thank 'u All |
|
Back to top |
|
|
|