View previous topic :: View next topic
|
Author |
Message |
arun_st
New User
Joined: 23 Feb 2007 Posts: 3 Location: Bangalore
|
|
|
|
I need to list the first line of all the members of a PDS in a Rexx script and i need to run this script from the USS
I know ADDRESS TSO "LISTDS 'ABC.DEF.GHI' MEMBERS" will list the members of the PDS..
Not sure how to list the first line of all the members in a particular PDS |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You only need to read the first line from each PDS member ?
Sounds mighty strange to me, in fact, I wouldn't be at all surprised if it was a HOMEWORK question. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
arun_st, there are some code examples on the IBM website that show how to perform various tasks in REXX running in USS. If I remember correctly, one of them shows how to work with a PDS using the BPXWDYN dynamic allocation routine.
I'll see if I can locate that url. |
|
Back to top |
|
|
rohitcognizant
New User
Joined: 13 Feb 2007 Posts: 54 Location: Pune India
|
|
|
|
hi arun
there is a way use outtrap command to do this outtrap command traps the output of tso/ispf commands into an array variable or a common variable ..
TRACE N
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
CALL OUTTRAP'TRAP.'
ADDRESS TSO "LISTDS 'ABC.DEF.GHI' MEMBERS
CALL OUTTRAP "OFF"
SAY TRAP.0
DO I = 1 TO TRAP.0 BY 1
SAY TRAP.I
here array trap.contains the the members of thepds from its 6th or 8th element i thinknot sure on that
after getting these membernames open them using EXECIO and read it into another array using the same command
eg: 'EXECIO * DISKR IN ( FINIS STEM.'
is an eg |
|
Back to top |
|
|
|