Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
To ensure whether a PDS Member exists or not

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Wed Aug 26, 2009 2:31 pm    Post subject: To ensure whether a PDS Member exists or not
Reply with quote

Hi
I used the below to ensure whether a PDS member exists or not.
Code:
address ispexec                                 
"Browse Dataset('LQ.SLQ.TLQ(Sample)') "


I just want to ensure, need not take control there, if the member is not there how to handle that case?
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Aug 26, 2009 2:47 pm    Post subject:
Reply with quote

Use this
Code:

ISOK=SYSDSN('LQ.SLQ.TLQ(SAMPLE)')     
IF ISOK = "OK" THEN   
address ispexec                                 
"Browse Dataset('LQ.SLQ.TLQ(Sample)') "
Back to top
View user's profile Send private message
craig2020

New User


Joined: 30 Jan 2007
Posts: 7
Location: Chennai

PostPosted: Wed Aug 26, 2009 4:41 pm    Post subject:
Reply with quote

Hi,
I used the below method to check if a PDS exist or not.

copy_library = 'USERID.COPYLIB.PDS'
copybook='MEMBER'
a=sysdsn("'"copy_library"("copybook")'") /*statement 1 */
b=sysdsn('USERID.COPYLIB.PDS(MEMBER)') /*statement 2 */
c=sysdsn('USERID.COPYLIB.PDS'||'('||'MEMBER'||')') /*statement 3 */


Though I am pointing to the same PDS member in all the above 3 statements, only the value of a is 'OK', but for b and c, I am getting MEMBER SPECIFIED, BUT DATASET IS NOT PARTITIONED.

Could you tell me if I am making any systax error in statement 2 & 3. Also what does the error message signfies. Thanks.

P.S I did not create a new thread as I felt this thread is open and also relevant to my question.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8620
Location: Back in jolly old England

PostPosted: Wed Aug 26, 2009 4:53 pm    Post subject:
Reply with quote

Try running with TRACE I and following the flow to see if that fgives you a clue.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Wed Aug 26, 2009 5:07 pm    Post subject:
Reply with quote

Since you can not bother reading the manual or tracing your script:

Rexx Ref Manual for SYSDSN wrote:
Code:
You can specify the dsname in any of the following ways:

Fully-qualified data set name — The extra quotation marks prevent TSO/E from adding your prefix to the data set name.
x = SYSDSN("'sys1.proj.new'")
x = SYSDSN('''sys1.proj.new''')

Non fully-qualified data set name that follows the naming conventions — When there is only one set of quotation marks or no quotation marks, TSO/E adds your prefix to the data set name.
x = SYSDSN('myrexx.exec')
x = SYSDSN(myrexx.exec)

Variable name that represents a fully-qualified or non fully-qualified data set name — The variable name must not be enclosed in quotation marks because quotation marks prevent variable substitution.
variable = "exec"
x = SYSDSN(variable) /* looks for 'userid.exec' */
y = SYSDSN('variable') /* looks for 'userid.variable' */
z = SYSDSN("'"variable"'") /* looks for 'exec' */


so, try: b=sysdsn('''USERID.COPYLIB.PDS(MEMBER)''')
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 Browsing member from any PDS shiitiizz CLIST & REXX 7 Wed Mar 08, 2017 1:17 am
No new posts Bind plan as a member to another bind... rexx77 DB2 0 Thu Feb 16, 2017 2:02 am
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us