Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

global variables

Status
Not open for further replies.

Arungs

Programmer
Jun 19, 2003
9
US
How do I validate if a pds member is available or not?
so that I can trap the error from execio statement

Thanks!!

 
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'
 
Thanks..for that info...!!!!
Its working!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top