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

Test if member in not-cataloged dataset exists


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Tue Jun 26, 2007 3:01 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Jun 26, 2007 4:29 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Jun 26, 2007 9:48 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top