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

How to List the first line of all the members of a PDS


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

New User


Joined: 23 Feb 2007
Posts: 3
Location: Bangalore

PostPosted: Thu Mar 29, 2007 5:57 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Mar 29, 2007 6:09 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Mar 29, 2007 6:19 pm
Reply with quote

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
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Tue Apr 10, 2007 11:41 am
Reply with quote

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
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 Write line by line from two files DFSORT/ICETOOL 7
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts rewrite same SAY line CLIST & REXX 8
No new posts Duplicate several members of/in one l... JCL & VSAM 7
Search our Forums:

Back to Top