Suppose that, in your SAS program that you want to use SYSTEM 2000 data that
is described
by a
view descriptor, but you cannot remember the
variable names or formats and informats. You can get this information by using the CONTENTS
or the DATASETS procedure.
The following example uses PROC DATASETS to give you information about the view descriptor
Vlib.EmpPos, which you created earlier. See
SAS/ACCESS Descriptor Files. The following output shows the results.
proc datasets library=vlib memtype=view;
contents data=emppos(s2kpw=demo);
run;
DATASETS Procedure Results with a View Descriptor
The SAS System 1
DATASETS PROCEDURE
Data Set Name: VLIB.EMPPOS Observations: 887
Member Type: VIEW Variables: 5
Engine: SASIOS2K Indexes: 0
Created: 03NOV89:16:17:59 Observation Length: 53
Last Modified: 07SEP89:14:15:58 Deleted Observations: 0
Data Set Type: Compressed: NO
Label:
-----Alphabetic List of Variables and Attributes-----
# Variable Type Len Pos Format Informat Label
---------------------------------------------------------------------------
4 DEPARTME Char 14 36 $14. $14. DEPARTMENT
2 FIRSTNME Char 10 10 $10. $10. FORENAME
1 LASTNAME Char 10 0 $10. $10. LAST NAME
5 MANAGER Char 3 50 $3. $3. MANAGER
3 POSITION Char 16 20 $16. $16. POSITION
TITLE
Notice the following
in the preceding output:
-
Because you cannot change a view descriptor's variable labels when you use PROC DATASETS,
the labels that are generated are the complete
SYSTEM 2000 item names at the time that the
view descriptor was created. The labels cannot be overridden.
-
The Created date is the date when the
access descriptor for this view descriptor was created.
-
The Last Modified date is the last date the SYSTEM 2000
database was updated.
-
The Observations number is the highest number of
schema records that occurred in the database. The number of observations shown here does
not correspond to the number of observations
that the view descriptor accesses.
For more information
about the DATASETS procedure, see the Base SAS Procedures Guide.