Probably your best bet would be to do a SYSDSN before the EXECIO. If you try trapping the ALLOC return code, you will usually get a 0 as this can be created or read.
However, you could do something like;
Mem = 'MY.DATA.SET(MYMEM)'
If SysDsn("'"Mem"') = 'OK' then do
"Alloc Fi(IN) Da('"Mem"') Shr Reu"
"Execio * DiskR IN (Stem IN. Finis)"
"Free Fi(IN)"
end
else say 'Member 'Mem' does not exist'
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.