SAS Code to Read in the ASCII SPD 1998 Food Security Status Data File data temp; infile 'd:\spd\spd98fs.dat' lrecl=42; *modify path and filename in accordance with file location in your system; input @1 sipp_pnl 4. /* first three variables are to match by 1998 household */ @5 pp_id 9. /* to SPD file */ @14 addidu8 $ 3. @17 fsscrnr8 2. /* food security module screening status */ @19 fsrawr8 2. /* household food security raw score */ @21 fsscalr8 4. /* household food security scale score (interval-level measure) */ @25 fsstatr8 2. /* household food security status category (categorical measure) */ @27 fsraadr8 2. /* adult food security raw score */ @29 fsscadr8 4. /* adult food security scale score (interval-level measure) */ @33 fsstadr8 2. /* adult food security status category (categorical measure) */ @35 fsrachr8 2. /* children's food security raw score */ @37 fsscchr8 4. /* children's food security scale score (interval-level measure) */ @41 fsstchr8 2.; /* children's food security status category (categorical measure) */ if fsscalr8 gt 0 then fsscalr8=fsscalr8/100; *to restore the 2 decimal places; if fsscadr8 gt 0 then fsscadr8=fsscadr8/100; *to restore the 2 decimal places; if fsscchr8 gt 0 then fsscchr8=fsscchr8/100; *to restore the 2 decimal places; run; proc freq data=temp; tables fsscrnr8--fsstchr8; title1 'Run 21: HH, unweighted'; run; *This SAS data set will now match to the SPD 1998 file by SIPP_PNL, PP_ID, ADDIDU8; *Note that I have made ADDIDU8 a character variable because I found some characters in it; *even though the SPD documentation shows it as a numeric variable; *PP_ID is stored with leading zeros as it is in the original SPD file, so it can be *read as either character or numeric and will match to the SPD file; *The 10 food security variables are not stored with leading zeros;