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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to List the first line of all the members of a PDS
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 29, 2007 6:09 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Mar 29, 2007 6:19 pm    Post subject: Re: How to List the first line of all the members of a PDS
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: 55
Location: Pune India

PostPosted: Tue Apr 10, 2007 11:41 am    Post subject:
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    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
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


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