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
 

 

Test if member in not-cataloged dataset exists

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

New User


Joined: 22 May 2007
Posts: 7
Location: Switzerland

PostPosted: Tue Jun 26, 2007 1:09 pm    Post subject: Test if member in not-cataloged dataset exists
Reply with quote

Hi All

I need to check for the existence of a certain member in a given pds.
Usually i would just call sysdsn and use that - problem is that i can't give a volser to this cmd.

What i would need is a possibility to do something like "sysdsn(sys1.parmlib,sysres)"

If i do an
"ALLOC F(IN) VOL(SYSRES) DS('SYS1.PARMLIB(NONEXIST)') SHR REUSE"
this gives me an RC of 0 - no matter if that member exists or not...
when i then say "EXECIO * DISKR IN (FINIS STEM in. " I get a system abend code 013, reason code 00000024.

Is there any way to do this in rexx/tso (no ispf)?

Greetings

Timm
Back to top
View user's profile Send private message

Pandora-Box

Moderator


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

PostPosted: Tue Jun 26, 2007 3:01 pm    Post subject:
Reply with quote

Please search before posting

please check this link

http://ibmmainframes.com/viewtopic.php?t=22165
Back to top
View user's profile Send private message
Savek

New User


Joined: 22 May 2007
Posts: 7
Location: Switzerland

PostPosted: Tue Jun 26, 2007 3:08 pm    Post subject:
Reply with quote

Please read before answering...

sysdsn only searches the catalog - doesn't help you much if you want a dataset on a specific volume

listds doesn't have a volume parameter either - so what was your point?
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: Tue Jun 26, 2007 4:29 pm    Post subject:
Reply with quote

Take a look at IEHLIST, you need to specify the VOL for that one
Back to top
View user's profile Send private message
Savek

New User


Joined: 22 May 2007
Posts: 7
Location: Switzerland

PostPosted: Tue Jun 26, 2007 7:58 pm    Post subject:
Reply with quote

Seems like the way to go - but i guess i'm missing something.
My code is:
Code:

 ADDRESS TSO
 dsn = "T328474.REXX.TEST"
 mem = "NONEXT"
 vol = "NWA000"
 
 "ALLOC F(SYSIN)    LRECL(80)  NEW REUSE"
 "ALLOC F(SYSOUT)   LRECL(121) NEW REUSE"
 "ALLOC F(SYSPRINT) LRECL(121) NEW REUSE"
 
 queue " LISTPDS DSNAME=("dsn"),VOL=3390="vol
 "EXECIO 1 DISKW SYSIN (FINIS "
 ADDRESS LINK "IEHLIST"

 ret_rc = rc
 "EXECIO * DISKR SYSPRINT (FINIS STEM in."
 say "Return Code:" ret_rc
 say "Got" in.0 "lines"
 do i = 1 to in.0
  say i":"in.i
 end
 "EXECIO * DISKR SYSOUT (FINIS STEM in."
 say "Got" in.0 "lines"
 do i = 1 to in.0
  say i":"in.i
 end
 "FREE F(SYSIN SYSOUT SYSPRINT)"


Output is:
Code:

Return Code: 8
Got 2 lines
1:1                              SYSTEMS SUPPORT UTILITIES---IEHLIST                               PAGE    1
2:-IEH106I UNAVAILABLE DEVICE TYPE OR VOLUME I.D. SPECIFIED
Got 0 lines


Any hints on what i should specify for VOL= ?
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: Tue Jun 26, 2007 9:48 pm    Post subject:
Reply with quote

Yep, you need to also allocate the volume to the REXX as well

X=BPXWDYN('ALLOC DD('DDname') SHR REUSE UNIT(SYSDA) VOL('volser')')

your code goe here

X=BPXWDYN('FREE DD('DDname')')
Back to top
View user's profile Send private message
Savek

New User


Joined: 22 May 2007
Posts: 7
Location: Switzerland

PostPosted: Tue Jun 26, 2007 11:43 pm    Post subject: Re: Test if member in not-cataloged dataset exists
Reply with quote

Thanks - got it working now icon_smile.gif
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 Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am


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