![]() Chapter Contents |
![]() Previous |
![]() Next |
| The DATASETS Procedure |
| Directory Listing to the SAS Log |
Obs or Entries,
Vars, and
Label.
| Directory Listing as SAS Output |
If you want only a directory, use the NODS option and the _ALL_ keyword in the DATA= option. The NODS option suppresses the description of the SAS data sets; only the directory appears in the output.
Note: The CONTENTS statement does not put a directory in an output
data set. If you try to create an output data set using the NODS option, you
receive an empty output data set. Use the SQL procedure to create a SAS data
set that contains information about a SAS data library. See DICTIONARY tables for
more information. ![[cautionend]](../common/images/cautend.gif)
| Procedure Output |
Only the items in the output that require explanation are
discussed.
Member Type ProtectionData Set TypeDeleted ObservationsCompressedSorted The Contents of the GROUP Data Set
DATASETS PROCEDURE
Data Set Name: HEALTH.GROUP Observations: 148
Member Type: DATA Variables: 11
Engine: V7 Indexes: 1
Created: 10:42 Thursday, August 28, 1997 Observation Length: 96
Last Modified: 11:13 Thursday, August 28, 1997 Deleted Observations: 0
Protection: READ Compressed: NO
Data Set Type: Sorted: YES
Label: Test Subjects
|
Engine and Operating Environment Dependent Information Section of CONTENTS Output
-----Engine/Host Dependent Information-----
Data Set Page Size: 8192
Number of Data Set Pages: 4
File Format: 7
First Data Page: 1
Max Obs per Page: 84
Obs in First Data Page: 62
Index File Page Size: 4096
Number of Index File Pages: 2
Number of Data Set Repairs: 0
File Name: external-file
Release Created: 7.00.000
Host Created: HP-UX
Inode Number: 718939608
Access Permission: rw-r--r--
Owner Name: UNIX-userid
File Size (bytes): 40960
|
#VariableNote: Variable names are sorted such that X1, X2, and X10 appear in
that order and not in the true collating sequence of X1, X10, and X2. Variable
names that contain an underscore and digits may appear in a nonstandard sort
order. For example, P25 and P75 appear before P2_5. ![[cautionend]](../common/images/cautend.gif)
TypePosNote: If none of the
variables in the SAS data set has a format, informat, or label associated
with it, the column for that attribute does not appear. ![[cautionend]](../common/images/cautend.gif)
-----Alphabetic List of Variables and Attributes-----
# Variable Type Len Pos Format Informat Label
----------------------------------------------------------------------------------------
9 BIRTH Num 8 8 DATE7. DATE7.
4 CITY Char 15 58 $. $.
3 FNAME Char 15 43 $. $.
10 HIRED Num 8 16 DATE7. DATE7.
11 HPHONE Char 12 79 $. $.
1 IDNUM Char 4 24 $. $.
7 JOBCODE Char 3 76 $. $.
2 LNAME Char 15 28 $. $.
8 SALARY Num 8 0 COMMA8. current salary excluding bonus
6 SEX Char 1 75 $. $.
5 STATE Char 2 73 $. $.
|
#IndexUnique OptionNomiss OptionVariables -----Alphabetic List of Indexes and Attributes-----
# of
Unique Nomiss Unique
# Index Option Option Values Variables
--------------------------------------------------------
1 vital YES YES 148 BIRTH SALARY |
Sorted field has
a value of YES.
SortedbyValidatedCharacter SetCollating SequenceSort Option -----Sort Information-----
Sortedby: LNAME
Validated: NO
Character Set: ASCII |
| Output Data Sets |
A |
indicates the data set is alter-protected. |
R |
indicates the data set is read-protected. |
W |
indicates the data set is write-protected. |
| . (period) | for not sorted. |
| 0 | for sorted but not validated. |
| 1 | for sorted and validated. |
The output data set is sorted by the variables LIBNAME and MEMNAME.
Note: The variable names are sorted so that
the values X1, X2, and X10
are listed in that order, not in the true collating sequence of X1, X10, X2.
Therefore, if you want to use a BY statement on MEMNAME in subsequent steps,
run a PROC SORT step on the output data set first or use the NOTSORTED option
in the BY statement. ![[cautionend]](../common/images/cautend.gif)
The Data Set Health.Grpout is an example of an output data set created from the GROUP data set, which
is shown in Describing a SAS Data Set and in Procedure Output .
An Example of an Output Data Set 1 OBS LIBNAME MEMNAME MEMLABEL TYPEMEM NAME TYPE LENGTH VARNUM 1 HEALTH GROUP Test Subjects BIRTH 1 8 9 2 HEALTH GROUP Test Subjects CITY 2 15 4 3 HEALTH GROUP Test Subjects FNAME 2 15 3 4 HEALTH GROUP Test Subjects HIRED 1 8 10 5 HEALTH GROUP Test Subjects HPHONE 2 12 11 6 HEALTH GROUP Test Subjects IDNUM 2 4 1 7 HEALTH GROUP Test Subjects JOBCODE 2 3 7 8 HEALTH GROUP Test Subjects LNAME 2 15 2 9 HEALTH GROUP Test Subjects SALARY 1 8 8 10 HEALTH GROUP Test Subjects SEX 2 1 6 11 HEALTH GROUP Test Subjects STATE 2 2 5 OBS LABEL FORMAT FORMATL FORMATD INFORMAT INFORML 1 DATE 7 0 DATE 7 2 $ 0 0 $ 0 3 $ 0 0 $ 0 4 DATE 7 0 DATE 7 5 $ 0 0 $ 0 6 $ 0 0 $ 0 7 $ 0 0 $ 0 8 $ 0 0 $ 0 9 current salary excluding bonus COMMA 8 0 0 10 $ 0 0 $ 0 11 $ 0 0 $ 0 |
An Example of an Output Data Set 2 OBS INFORMD JUST NPOS NOBS ENGINE CRDATE MODATE DELOBS 1 0 0 8 148 V7 28AUG97:10:42:26 28AUG97:11:13:46 0 2 0 0 58 148 V7 28AUG97:10:42:26 28AUG97:11:13:46 0 3 0 0 43 148 V7 28AUG97:10:42:26 28AUG97:11:13:46 0 4 0 0 16 148 V7 28AUG97:10:42:26 28AUG97:11:13:46 0 5 0 0 79 148 V7 28AUG97:10:42:26 28AUG97:11:13:46 0 6 0 0 24 148 V7 28AUG97:10:42:26 28AUG97:11:13:46 0 7 0 0 76 148 V7 28AUG97:10:42:26 28AUG97:11:13:46 0 8 0 0 28 148 V7 28AUG97:10:42:26 28AUG97:11:13:46 0 9 0 0 0 148 V7 28AUG97:10:42:26 28AUG97:11:13:46 0 10 0 0 75 148 V7 28AUG97:10:42:26 28AUG97:11:13:46 0 11 0 0 73 148 V7 28AUG97:10:42:26 28AUG97:11:13:46 0 OBS IDXUSAGE MEMTYPE IDXCOUNT PROTECT FLAGS COMPRESS REUSE SORTED SORTEDBY 1 COMPOSITE DATA 1 R-- --- NO NO 0 . 2 NONE DATA 1 R-- --- NO NO 0 . 3 NONE DATA 1 R-- --- NO NO 0 . 4 NONE DATA 1 R-- --- NO NO 0 . 5 NONE DATA 1 R-- --- NO NO 0 . 6 NONE DATA 1 R-- --- NO NO 0 . 7 NONE DATA 1 R-- --- NO NO 0 . 8 NONE DATA 1 R-- --- NO NO 0 1 9 COMPOSITE DATA 1 R-- --- NO NO 0 . 10 NONE DATA 1 R-- --- NO NO 0 . 11 NONE DATA 1 R-- --- NO NO 0 . |
An Example of an Output Data Set 3 OBS CHARSET COLLATE NODUPKEY NODUPREC ENCRYPT POINTOBS GENMAX GENNUM GENNEXT 1 ASCII NO NO NO YES 0 . 0 2 ASCII NO NO NO YES 0 . 0 3 ASCII NO NO NO YES 0 . 0 4 ASCII NO NO NO YES 0 . 0 5 ASCII NO NO NO YES 0 . 0 6 ASCII NO NO NO YES 0 . 0 7 ASCII NO NO NO YES 0 . 0 8 ASCII NO NO NO YES 0 . 0 9 ASCII NO NO NO YES 0 . 0 10 ASCII NO NO NO YES 0 . 0 11 ASCII NO NO NO YES 0 . 0 |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.