Date: Fri, 21 Mar 1997 15:21:33 -0500
Reply-To: MICHAEL.RAITHEL@RAITHM49.CUSTOMS.SPRINT.COM
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "Michael A. Raithel" <MICHAEL.RAITHEL@RAITHM49.CUSTOMS.SPRINT.COM>
Subject: Re: Proc Contents (MVS)
Chris Strickland posted the following:
>Gosh, MVS really bites. I'm trying to do something simple that I've
>never had problems with in VMS, Dos or Unix. But in in MVS it gives
>me errors.
>
>Basically here's the code
>
>proc contents data=smtdw37._all_ directory; run;
>
>I get the following error.
>
>ERROR: Library SMTDW37 is not in a valid format for access method
>SASEB.
>
>Geesh, I just want to easily find the SAS files while in SAS. Give me
>UNIX, Win95, NT, VMS any day over MVS. Well, at least I have access
>to SAS.
>
Chris, I think that I sensed, within your gripe, the question as to how
and why you got the error message listed above. If that is indeed the
information that you are after, then consider the following:
In the MVS environment, SAS files--data sets, catalogs, formats, etc.--
are stored in a SAS data library. The SAS data library exists as an OS
data set. That OS data set may be nestled among hundreds or thousands
of other OS data sets that exist on your organization's DASD. MVS
considers the SAS data library to be "just another" OS data set, and
DOES NOT KNOW that within the SAS data library there are SAS files.
And, from the "outside" there may not be an easy way for you to tell
either.
But, the SAS System for Information delivery CAN tell which OS data sets
ARE SAS data libraries and which are not. When you attempt to execute
the CONTENTS procedure against an OS data set that is not a SAS data
library, you will get the error message that you described above.
Clearly, that was the problem: There was no SAS data library directory,
or any other valid SAS control information "inside" of the OS data set
for the CONTENTS procedure to process... so the SAS System gave you
that error.
I can suggest two quick approaches to determining if a particular OS
data set is a SAS data library :
1. The most obvious is to ask, nay demand, that your compatriots use a
commonly agreed-upon suffix node in the DSN to identify the SAS data
libraries from the other OS data sets. In my own organization, we
use either "PDB" or "SAS". So, a SAS data library might be named:
CHRIS.GOODDATA.PDB or CHRIS.GOODATA.SAS
2. Within your Display Manager Session, if you attempt to allocate an
OS data set that is not a SAS data library via the LIBNAME
statement, the SAS System will give you an error, and not
allow it. This, itself, is a good way to determine if a
mystery data set is a SAS data library; simply attempt to
LIBNAME the data set.
What the above paragraph implies is that you can ONLY take
the CONTENTS of the OS data sets that you have successfully
LIBNAME-ed. So, before you attempt to execute the CONTENTS
procedure against a data set, do the following:
Type LIB on the command name. The SAS Display Manager will
bring you into the LIBNAME window. The LIBNAME window
displays all of the SAS data libraries currently allocated
to your session. You can perform a PROC CONTENTS on any one
of them without worry.
If the data set that you are interested in is not in the
list, then you need to LIBNAME it. This brings you back to
the first point in #2, above.
There are a lot of other ways that you can tell whether or not an OS
data set is a SAS data library. But, the above two methods are the
quickest and easiest.
Chris, just as you tamed "UNIX, Win95, NT, VMS", so too can you boldly
take control of MVS and bend it to your will! Go for it!
I hope that this suggestion proves helpful now, and in the future!
Of course, all of these opinions and insights are my own, and do not
reflect those of my organization or my associates.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Michael A. Raithel
E-mail: maraithel@mcimail.com
Author: Tuning SAS Applications in the MVS Environment
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
... and enterprises of great pitch and moment, with this regard their
currents turn awry, and lose the name of action.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++