Input SAS Data Set for Examples

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.
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:
data city; input Year 4. @7 ServicesPolice comma6. @15 ServicesFire comma6. @22 ServicesWater_Sewer comma6. @30 AdminLabor comma6. @39 AdminSupplies comma6. @45 AdminUtilities comma6.; ServicesTotal=ServicesPolice+ServicesFire+ServicesWater_Sewer; ...

Get Step-by-Step Programming with Base SAS 9.4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.