Well, a dataset is a dataset is a dataset. That technique will tell you whether the dataset exists or not, but not whether it's sequential or partitioned.
If what you want is to know whether this dataset is a PDS or not, "LISTDSI" is your guy. The write-up is in the TSO-E CLIST reference. One of the variables brought back by a successful LISTDSI call is "SYSDSORG": PS or PO or PO-E.
Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster