Thanks, Lionel.  Nice and compact!

Cathy

On Thu, 19 Jun 2008 13:30:56 -0700, Lionel B Dyck <[EMAIL PROTECTED]> 
wrote:

>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

----------------------------------------------------------------------
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