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

how to find whether a member of pds is already exists or not


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

New User


Joined: 07 Jun 2007
Posts: 15
Location: chennai

PostPosted: Fri Jun 22, 2007 12:37 pm
Reply with quote

hi,
i want to find out whether a member of a pds is already existing or not in rexx., if exists how to delete it..could u help me by quoting some syntax to do it.......i found out LISTDSI function in rexx....but it is useful in finding out only the information regarding pds...but it is not giving any information regarding member a pds...

rec = listdsi(pds)-------it is giving out information
rec = listdsi (pds(member))-----it is not responding
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Jun 22, 2007 1:23 pm
Reply with quote

Try LISTDS instead of LISTDSI

or look at LM services in the ISPF books.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Fri Jun 22, 2007 2:04 pm
Reply with quote

or SYSDSN.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Jun 22, 2007 2:34 pm
Reply with quote

You can also say

Code:


M membername



in the command line after selecting the pds in which you need to search
Back to top
View user's profile Send private message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 186
Location: India

PostPosted: Fri Jun 22, 2007 3:44 pm
Reply with quote

Hey anilsanda,
Just refer the following sample code -

Code:
dsname='PDSNAME' || '(' || memname ||')'

if (sysdsn("'"dsname"'") = 'OK') then
    Do Normal Processing
else do
   if (sysdsn("'"dsname"'") \= 'MEMBER NOT FOUND') then
       say 'Member not present ...'
   else
       say 'Error while processing the PDS ' PDSNAME
end
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 To find whether record count are true... DFSORT/ICETOOL 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Searching for a member but don't know... TSO/ISPF 6
No new posts Looking For a PDS Member Without Open... PL/I & Assembler 10
Search our Forums:

Back to Top