SAS Code to Read in the ASCII SPD 2002 Food Security Status Data File *SAS program to read public-use SPD 2002 food security data file; data temp; infile 'd:\foodsecu\spd\spd2002\spd02fs.dat' lrecl=41; *modify path and filename in accordance with file location in your system; input @1 ihhkey02 $ 15. /* first variable is to match by 2002 household */ @16 fsscrnr2 2. /* food security module screening status */ @18 fsrawr2 2. /* household food security raw score */ @20 fsscalr2 4. /* household food security scale score (interval-level measure) */ @24 fsstatr2 2. /* household food security status category (categorical measure) */ @26 fsraadr2 2. /* adult food security raw score */ @28 fsscadr2 4. /* adult food security scale score (interval-level measure) */ @32 fsstadr2 2. /* adult food security status category (categorical measure) */ @34 fsrachr2 2. /* children's food security raw score */ @36 fsscchr2 4. /* children's food security scale score (interval-level measure) */ @40 fsstchr2 2.; /* children's food security status category (categorical measure) */ if fsscalr2 gt 0 then fsscalr2=fsscalr2/100; *to restore the 2 decimal places; if fsscadr2 gt 0 then fsscadr2=fsscadr2/100; *to restore the 2 decimal places; if fsscchr2 gt 0 then fsscchr2=fsscchr2/100; *to restore the 2 decimal places; run; proc freq data=temp; tables fsscrnr2--fsstchr2; title1 'Run 15/2: HH, unweighted'; run; *This SAS data set will now match to the SPD 2002 Cross-Sectional File by IHHKEY02; *If SPD 2002 Cross-Sectional File is dated earlier than March 10, 2004, IHHKEY02 must be corrected by replacing its final 3 characters with the value of ADDIDE2; *IHHKEY02 and ADDIDE2 are listed as IHHKEY0X and ADDIDEX in some SPD documentation; *The 10 food security variables are stored without leading zeros;