Starting with SAS Data Sets |
The examples in this section use a SAS data set named CITY, which contains information about expenditures for a small city. It reports total city expenditures for the years 1980 through 2000 and divides the expenses into two major categories: services and administration. (To see the program that creates the CITY data set, see DATA Step to Create the Data Set CITY.)
The following example uses the DATASETS procedure with the NOLIST option to display the CITY data set. The NOLIST option prevents the DATASETS procedure from listing other data sets that are also located in the WORK library:
proc datasets library=work nolist; contents data=city; run;
The Structure of CITY as Shown by PROC DATASETS
The SAS System 1 The DATASETS Procedure Data Set Name: WORK.CITY Observations: 21 1 Member Type: DATA Variables: 10 1 Engine: V8 Indexes: 0 Created: 9:54 Wednesday, October 6, 1999 Observation Length: 80 Last Modified: 9:54 Wednesday, October 6, 1999 Deleted Observations: 0 Protection: Compressed: NO Data Set Type: Sorted: NO Label: -----Engine/Host Dependent Information----- 2 Data Set Page Size: 8192 Number of Data Set Pages: 1 First Data Page: 1 Max Obs per Page: 101 Obs in First Data Page: 21 Number of Data Set Repairs: 0 File Name: /usr/tmp/code_editor_saswork/SAS_ work63ED00006E98/city.sas7bdat Release Created: 8.0001M0 Host Created: HP-UX Inode Number: 62403 Access Permission: rw-r--r-- Owner Name: abcdef File Size (bytes): 16384 -----Alphabetic List of Variables and Attributes----- 3 # Variable Type Len Pos 4 Label ---------------------------------------------------------------------------- 5 AdminLabor Num 8 32 Administration: Labor 6 AdminSupplies Num 8 40 Administration: Supplies 9 AdminTotal Num 8 64 Administration: Total 7 AdminUtilities Num 8 48 Administration: Utilities 3 ServicesFire Num 8 16 Services: Fire 2 ServicesPolice Num 8 8 Services: Police 8 ServicesTotal Num 8 56 Services: Total 4 ServicesWater_Sewer Num 8 24 Services: Water & Sewer 10 Total Num 8 72 Total Outlays 1 Year Num 8 0
The following list corresponds to the numbered items in the previous SAS output:
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.