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
 
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: 1542
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Z/OS hosted on Linux (zDT) or zVM - T... Pete Wilson All Other Mainframe Topics 0 Tue Sep 26, 2017 2:06 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm

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