View previous topic :: View next topic
|
Author |
Message |
Savek
New User
Joined: 22 May 2007 Posts: 7 Location: Switzerland
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
Back to top |
|
|
Savek
New User
Joined: 22 May 2007 Posts: 7 Location: Switzerland
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Take a look at IEHLIST, you need to specify the VOL for that one |
|
Back to top |
|
|
Savek
New User
Joined: 22 May 2007 Posts: 7 Location: Switzerland
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Savek
New User
Joined: 22 May 2007 Posts: 7 Location: Switzerland
|
|
|
|
Thanks - got it working now |
|
Back to top |
|
|
|