Cathy - try this simple exec that you can call from your exec. If you get 
a return code of 0 then it is allocated and if you get a 4 then it is not 
allocated

/* rexx to test if a dd is allocated */ 
arg ddname 
call outtrap 'isa.' 
'listalc sta sys' 
call outtrap 'off' 
do i = 1 to isa.0 
   select 
   when word(isa.i,2) = ddname then exit 0 
   when word(isa.i,1) = ddname then exit 0 
   otherwise nop 
   end 
   end 
/* ------------ * 
 * DD Not Found * 
 * ------------ */ 
 exit 4                     


Lionel B. Dyck, Consultant/Specialist 
Enterprise Platform Services, Mainframe Engineering 
KP-IT Enterprise Engineering 
925-926-5332 (8-473-5332) | E-Mail: [EMAIL PROTECTED] 
AIM: lbdyck | Yahoo IM: lbdyck 
Kaiser Service Credo: "Our cause is health. Our passion is service. We're 
here to make lives better." 

I never guess. It is a capital mistake to theorize before one has data. 
Insensibly one begins to twist facts to suit theories, instead of theories 
to suit facts. 
- Sir Arthur Conan Doyle 

NOTICE TO RECIPIENT: If you are not the intended recipient of this e-mail, 
you are prohibited from sharing, copying, or otherwise using or disclosing 
its contents. If you have received this e-mail in error, please notify the 
sender immediately by reply e-mail and permanently delete this e-mail and 
any attachments without reading, forwarding or saving them. Thank you. 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to