Hi all,

thanks to all who answered to my question. I finally decide to use LISTCAT to determine the dataset type. Here 's my result;

/* REXX */
arg dsn err_ret = "ERROR" dsn = "'"dsn"'" /*-------------------------------------------------------------------*/ fkt_call = listdsi(dsn 'RECALL') if fkt_call > 4 then do select when sysreason = "0003" then call listc when sysreason = "0005" then exit "NOTCATLG" otherwise exit err_ret end end if sysdsorg = "VS" then call listc else exit sysdsorg /*-------------------------------------------------------------------*/ listc: ind = ind1 = fkt_call = outtrap("lcat.",'*',"NOCONCAT") address TSO "LISTC ENT("dsn") ALL" lc_ret = rc fkt_call = outtrap("OFF") if lc_ret > 4 then exit err_ret do i = 1 to lcat.0 lcat.i = left(lcat.i,length(lcat.i)+1," ") if pos(" LINEAR ",lcat.i) ^= 0 then ind = "L" if pos(" INDEXED ",lcat.i) ^= 0 then ind = "K" if pos(" NONINDEXED ",lcat.i) ^= 0 then ind = "E" if pos(" DSNTYPE--------------HFS ",lcat.i) ^= 0 then ind = "H" if pos(" ZFS ",lcat.i) ^= 0 then ind1 = "Z" end select when ind = "L" & ind1 = "Z" then err_ret = "ZFS" when ind = "L" then err_ret = "VS-LINEAR"
when ind = "K" then err_ret = "VS-KSDS"
when ind = "E" then err_ret = "VS-ESDS"
when ind = "H" then err_ret = "HFS" otherwise err_ret = "UNKNOWN" end exit err_ret

You may invoke this procedure as function, the function argument is the dsn of the dataset checked.

Lindy Mayfield schrieb:
Unfortunately then, this basically comes down to a naming convention, do
you agree?


--

___________________________________________________________________



Freundliche Gruesse / Kind regards



Dipl.Math. Juergen Kehr, IT Schulung & Beratung, IT Education + Consulting

Tel.  +49-561-9528788  Fax   +49-561-9528789  Mobil +49-172-5129389

ICQ 292-318-696 (JKehr)



mailto:[EMAIL PROTECTED]

mailto:[EMAIL PROTECTED]

___________________________________________________________________

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