****+****1****+****2****+****3****+****4****+****5****+****6****+****7*** * This is the SAS filter program for the 5-Single data files. * I wrote filters to allow us the flexibility of switching back to * our Mac based scanner files if Y2K is a problem. Also, using the * filter program approach will not require users of the old tab-delimited * files to convert their applications and we do not have to track down * all files that use the old format and correct their input statements. * 11.VIII.99 --- CDD *************************************************************************; data raw; infile "&curfl" lrecl=512 missover firstobs=1; input @1 formid $3. @6 scanid $4. @10 batchid $3. @13 scdate $6. @41 name $char20. @61 sex $1. @62 educ $2. @64 mon $2. @66 day $2. @68 yr $2. @70 id $char10. @80 sc $char6. @86 (q1-q200) ($1.); if batchid=' ' then delete; *** Toss junk record at end of file; scmo=substr(scdate,1,2); scda=substr(scdate,3,2); scyr=substr(scdate,5,2); scandate=compress(scmo||'-'||scda||'-'||scyr); form='5-Single'; file "5s.&batchid" lrecl=1024; put form $8. '09'x batchid $3. '09'x scanid $4. '09'x scandate $8. '09'x name $20. '09'x sex $1. '09'x educ $2. '09'x mon $2. '09'x day $2. '09'x yr $2. '09'x id $10. '09'x sc $6. '09'x (q1-q200) ($1. '09'x); run;