| Date: | Fri, 3 Dec 2004 17:34:57 -0800 |
| Reply-To: | Tony Wang <tonywolf@YAHOO.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Tony Wang <tonywolf@YAHOO.COM> |
| Organization: | http://groups.google.com |
| Subject: | messy data loading problem |
| Content-Type: | text/plain; charset=ISO-8859-1 |
The raw data is like this: (hundreds of millions of records)
"D07500505207060A","1906","2002","F","1","120","19941101","20020310","110","19921201","19941031",
hundreds of blanks....then 2nd record (total length=725)
program:
data MBR;
infile "f:\dataload\NJ_Medicaid\rawdata\RECIP_REC.txt" recfm=f
firstobs=1 dlm=',' dsd pad missover;
ARRAY PSC(*) $3 PSC1-PSC24 ;
ARRAY EFF(*) $8 EFFDAT1-EFFDAT24;
ARRAY EXP(*) $8 EXPDAT1-EXPDAT24;
INPUT
MBRID :$16.
YOB :$4.
YOD :$4.
GENDER :$1.
RACE :$1.;
DO I =1 TO DIM(PSC);
INPUT PSC(I) :$3.
EFF(I) :$8.
EXP(I) :$8.;
END;
run;
The last 3 variables repeated up to 24 times. The error message is
like "LOST CARD" or no error msg but the last 3 variables repeatedly
read into the next records...
How can I let sas know it is time to stop reading the current records
and go to the next records? I set the lrecl=725 but it didn't work.
Thanks,
Tony
|