* Reads data in 1 record/case format.
* Data definition for cell variables is in Fortan format at the end.

set width 80.
file handle in /name="/eds/datasets/census60/data/newyork.dat"

  state        21-22
  county       25-27
  tractpre     28-30 (A)
  tract        31-34 (A)
  tractsuf     35-37 (A)
  stateq       45-46
  smsa         49-52
  minorciv     53-55
  urban60      69-72
  urbanrur        73
  placed          77
  tarea        81-84
  tgroup       85-88   (A)
  placesz      89-90
  place        93-96
  ward        101-102
  congdist    105-106
  ecoarea     109-110  (A)
  sca             113  (A)
  cvr             117
  tcenterc        133
  tcenter         137
  V01001 to V01008
  V02001 to V02006
  V03001 to V03012
  V04001 to V04016
  V05001 to V05016
  V06001 to V06008
  V07001 to V07006
  V08001 to V08008
  V11001 to V11004
  V12001 to V12050
  V13001 to V13006
  V14001 to V14032
  V15001 to V15032
  V16001 to V16020
  V17001 to V17003
  V18001 to V18002
  V19001 to V19014
  V20001 to V20018
  V21001 to V21007
  V22001 to V22024
  V23001 to V23019
  V24001 to V24035
  V25001 to V25035
  V26001 to V26018
  V27001 to V27006
  V28001 to V28048
  V29001 to V29004
  V30001 to V30025
  V31001 to V31008
  V32001 to V32015
  V33001 to V33032
  V34001 to V34010
  V35001 to V35003
  V36001 to V36008
  V37001 to V37005
  V38001 to V38007
  V41001 to V41002
  V42001 to V42017
  V43001 to V43003
  V44001 to V44024
  V45001 to V45013
  V46001 to V46011
  V47001 to V47003
  V48001 to V48006
  V49001 to V49032
  V50001 to V50012
  V51001 to V51013
  V52001 to V52004
  V53001 to V53030
  V54001 to V54039
  V55001 to V55013
  V56001 to V56003
  V57001 to V57002
  V58001 to V58004
  V59001 to V59003
  V60001 to V60020
  V61001 to V61008
  V630001 to V630231
variable labels
  state       "State Code"
  county      "County Code"
  tractpre    "Tract Prefix"
  tract       "Tract Basic"
  tractsuf    "Tract Suffix"
  stateq      "Quasi-State Code"
  smsa        "Standard Metropoitan Statistical Area"
  minorciv    "Minor Civil Divison"
  urban60     "Urbanized Area"
  urbanrur    "Urban/Rural"
  placed      "Place Description"
  tarea       "Tracted Area Code"
  tgroup      "Tract Group Code"
  placesz     "Place Size Code"
  place       "Place"
  ward        "Ward"
  congdist    "Congressional District"
  ecoarea     "State Economic Area"
  sca         "Standard Consolidated Area"
  cvr         "Crews of Vessels Tract Indicator"
  tcenterc    "Tract in Central City County"
  tcenter     "Tract in Central City"
Value Labels
    01  "Alaska"
    02  "Hawaii"
    11  "Maine"
    12  "New Hampshire"
    13  "Vermont"
    14  "Massachusetts"
    15  "Rhode Island"
    16  "Connecticut"
    21  "New York"
    22  "New Jersey"
    23  "Pennsylvania"
    31  "Ohio"
    32  "Indiana"
    33  "Illinois"
    34  "Michigan"
    35  "Wisconsin"
    41  "Minnesota"
    42  "Iowa"
    43  "Missouri"
    44  "North Dakota"
    45  "South Dakota"
    46  "Nebraska"
    47  "Kansas"
    51  "Delaware"
    52  "Maryland"
    53  "D.C."
    54  "Virginia"
    55  "West Virginia"
    56  "North Carolina"
    57  "South Carolina"
    58  "Geogia"
    59  "Florida"
    61  "Kentucky"
    62  "Tennessee"
    63  "Alabama"
    64  "Mississippi"
    71  "Arkansas"
    72  "Louisiana"
    73  "Oklahoma"
    74  "Texas"
    81  "Montana"
    82  "Idaho"
    83  "Wyoming"
    84  "Colorado"
    85  "New Mexico"
    86  "Arizona"
    87  "Utah"
    88  "Nevada"
    91  "Washington"
    92  "Oregon"
    93  "California"  /
    24  "New York City"
    25  "Piladelphia"
    36  "Chicago"
    04  "Los Angeles"  /
    03  "Bronx, NY"
    24  "Kings, NY"
    31  "New York, NY"
    41  "Queens, NY"
    43  "Staten Island, NY"

freq vars=state to stateq / format=condense.
save outfile="/eds/datasets/census60/data/newyork.sav".
select if stateq eq 24.
freq vars=state to stateq / format=condense.
save outfile="/eds/datasets/census60/data/newyorkcity.sav".