What I'm trying to do:
I am putting together a large panel data set of Surveys and Censii of Government, and want to include the 1993-94, 1994-95 and 1995-96 Surveys of Government, which are on the U.S. Census governments website. I have already processed files for 1976 through 1992, which were in a different data format. In particular, I'm interested in the Individual Unit File for the 1993, 1994, 1995 and 1996 Surveys of Government. The technical documentation file describes the file format as follows:
The record layout is below.
Positions Field
Field
From To
Length
State code
1 2
2
Type code
3 3
1
County code
4 6
3
Unit code
7 9
3
Sup code
10 12
3
Sub code
13 14
2
Line item code
15 17
3
Amount (thousands of dollars)
18 29
12
Survey year
30 31
2
Year of data
32 33
2
Origin
34 35
2
I'm only interested in the identifying items (State code, Type code, County code, Unit code), line item code and Amount. The line item codes are described in the Government Clasification manual. Line items with zero amounts are omitted, so that each government will be associated with a different number of records.
I want to have a rectangular file with a specific
government (identified by the State, County and Unit codes) as the unit
of observation, and with the line item codes defining the columns.
What I've Done So Far
I called the SAS help line last week, and they suggested trying a macro. I've written a test program which is here and which generated this log file. Obviously, I'm not an experienced writer of macros.