/* SHORT TITLE:  Program for 2001 - written by hand */

set width 80.
data list  file="/eds/datasets/us-immigr/imm01/data/imm01.dat" 
    / yr          1-4 (A)
      mn          5-6 (A)
      ctrybrth   7-11 (A) 
      lastres   12-16 (A)
      ctrychrg  17-21 (A) 
      agea      22-23 (A) 
      gender       24 (A)
      maristat     25
      occup     26-28 (A)
      stateres  29-30 (A)
      metres    31-70 (A)
      labor        71 (A)
      nonclass  72-74 (A)
      nonyear   75-78 (A)
      tyofcase     79 (A)
      class2    80-81
      classp       82 (A)
.
numeric mnadmit age (f2.0) yradmit (f4.0)  sex laborcrt (f1.0) .

recode mn (CONVERT) ("UU" = 99) into mnadmit. 
recode yr (CONVERT) ("UUUU" = 9999) into yradmit. 
recode agea (CONVERT) ("UU" = 99) into age.
recode gender (CONVERT) ("M" =1) ("F" =2) into sex.
recode labor (" " =9) (CONVERT) ("N" =3) ("Y" =1)  into laborcrt.

var labels 
  mnadmit    "Month of Admission"
  yradmit    "Year of Admission"
  ctrybrth   "Country of Birth"                   
  lastres    "Country of Last Permanent Residence"
  maristat   "Marital Status"                     
  stateres   "State of Residence"                 
  metres     "Metropolitat area of intended residence"                 
  laborcrt   "Labor Certification"                
  occup      "Occupation"                         
  ctrychrg   "Country of Chargeability"
  tyofcase   "Type of Case"                       
  nonclass   "Non-immigrant Class of Entry"       
  nonyear    "Non-immigrant Year of Entry"        
  class2     "Class of Admission - 2 digit"
  classp     "Prinicpal vs derivative class of admission"
.

*Include codes for Country of Birth, 
                   Country of Last Permanent Residence,
                   Country of Chargeability.
set printback=none.
include file="/eds/datasets/us-immigr/imm01/programs/imm01-co.sps" 
set printback=listing.

VALUE LABELS
  yradmit
     9999  "Unknown"/
  mnadmit
     99    "Unknown"/
  age 
     75 "75 and over"
     99 "unknown"/
  maristat
     1 "Single"
     2 "Married"
     3 "Widowed"
     4 "Divorced"
     5 "Separated"
     9 "Unknown, not reported" /
 sex
     1 "Male"
     2 "Female"
     9 "Unknown, not reported" /
 tyofcase
     "A" "Adjustment of status (through INS)"
     "N" "New arrival from abroad (through Department of State)"
     "R" "Refugee or asylee adjustment of status"  /
 laborcrt
     1 "Issued labor certification"
     3 "Not issued labor certification"
     9 "Unknown" /

 occup
     "10" "Executive, administrative, managerial"
     "20" "Architects and surveyors"
     "31" "Aerospace engineers"
     "33" "Agricultural engineers"
     "35" "Chemical, nuclear, petrol. engineers"
     "37" "Civil engineers"
     "39" "Electrical and electronic engineers"
     "41" "Industrial engineers"
     "43" "Mechanical & marine engineers, naval arch."
     "47" "Metallurgical, rnaterials, mining engineers"
     "49" "Engineers, unspec or n.e.c."
     "50" "Computer, mathematical, O.R. scientists"
     "60" "Physical scientists"
     "70" "Life scientists"
     "75" "Social, recreation, religious workers"
     "80" "Social scientists & urban planners"
     "87" "Lawyers & judges"
     "90" "Teachers, college & university"
     "93" "Teachers, except college"
     "95" "Vocational & educational counselors"
     "97" "Librarians, archivists, & curators"
     "100" "Physicians"
     "101" "Dentists, optom., podiatists, etc."
     "105" "Veterinarians"
     "110" "Registered nurses"
     "111" "Pharmacists, dieticians, PA, therapists"
     "115" "Physical therapists"
     "120" "Writers, artists, composers"
     "130" "Perfonners"
     "135" "Editors, reporters, PR, announcers"
     "140" "Athletes & related workers"
     "150" "Technologists & technicians"
     "200" "Marketing and sales personnel"
     "300" "Administrative support oct. inc. clerical"
     "400" "Private household service"
     "420" "Protective service"
     "430" "Food & beverage prep and service"
     "450" "Health service"
     "460" "Cleaning & building service"
     "480" "Persona1 service"
     "500" "Agriculture"
     "530" "F0TeStt-y & logging"
     "560" "Fishers, hunters, trappers"
     "600" "Mechanics & repairers"
     "650" "Construction"
     "700" "Extractive"
     "750" "Precision production"
     "800" "Machine operators & tenders"
     "850" "Transportation & material moving"
     "900" "Handlers, equipment cleaners, helpers & lab"
     "990" "Military"
     "991" "Homemakers"
     "992" "Students or children"
     "995" "Retirees"
     "997" "Unemployed"
     "999" "Not reported"  /

 class2
     1 "Family 1st preference"
     2 "Family 2nd preference"
     3 "Family 3rd preference"
     4 "Family 4th preference"
     5 "Employment 1st preference."
     6 "Employment 2nd preference."
     7 "Employment 3rd preference."
     8 "Employment 4th preference."
     9 "Employment 5th preference"
     13 "Diversity"
     14 "Immediate relatives of U.S. citizens-spouses"
     15 "Immediate relatives of U.S. citizens-children"
     16 "Immediate-relatives of U.S. citizens-orphan children"
     17 "Immediate relatives of U.S. citizens-parents"
     18 "Children born abroad to legal permanent residents"
     19 "Refugees"
     20 "Asylees"
     21 "Amerasians"
     22 "IRCA legalization dependents"
     23 "Diversity transistion"
     24 "Lautenburg parolees"
     25 "Cancellation of removal"
     26 "IRCA legalization-pre-1992 residence"
     27 "IRCA legalization-SAW"
     28 "NACARS"
     29 "Other"
     30 "Unknown"
     31 "HRIFA"  /
  classp
     "P" "Prinicpal"
     "X" "Derivative" /
.

*freq var = sex mnadmit yradmit laborcrt age.
freq var = ctrybrth.

save outfile="/eds/datasets/us-immigr/imm01/data/imm01.sav"
     /drop agea mn yr gender labor.