Sure: Here is the log when I run it for a second time: NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24
25 GOPTIONS ACCESSIBLE;
26
27 DATA d_old;
28 LENGTH inputtype $1.
29 FN $500.
30 FN2 $250.;
31 INFILE DATALINES DSD delimiter='|';
32 INPUT inputtype $ FN $ FN2 $;
33
34 SELECT (inputtype);
35 WHEN ('N') INFILE foo filevar=fn memvar=fn2 LRECL=603 end=done TRUNCOVER;
36 WHEN ('Z') INFILE foo ZIP filevar=fn memvar=fn2 LRECL=603 end=done TRUNCOVER;
37 OTHERWISE;
38 END;
39
40
41 DO while (not done);
42 INPUT &datain.;
43 OUTPUT;
44 END;
45
46 DROP inputtype;
47
48 DATALINES;
ERROR: Invalid record format.
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
49 N|XXXXX|2011.
101 txt
inputtype=N FN=XXXXX FN2=2011.txt done=0
DeathPlaceStateCode= CertNumber= DecNameLast= DecNameFirst= DecNameMI= DecNameGenID= Soundex= AliasCode= Sex= DeathDateMo=
DeathDateDay= DeathDateCC= DeathDateYY= DecSSN= DecAgeUnit= DecAgeNumber= DecAgeMonths= DecAgeDays= DecAgeHours=
DecAgeMin= DecDOBMo= DecDOBDay= DecDOBCC= DecDOBYY= DecBirthPlaceStateCountryCode= DecInfCertNumTNBirth=
DecInfCertNumOOSBirth= DeathPlaceCode= DeathPlaceType= DeathPlaceCityCode= DeathPlaceCountyCode= DecMaritalStatus=
DecResStateCode= DecRaceSexWNU= DecRaceSexWBOU= DecResCity= DecResAddress= DecResCityLimitsInd= DecResZip= ResStateInd=
DecResCountyStateCode= DecResCityCode= ResCensusTract= DecHispanicOriginCode= DecRace= DecEducationYrs= DadNameLast=
DadNameFirst= MomNameMaidenLast= MomNameFirst= FuneralHomeCode= FuneralHomeCountyAbbrev= FuneralHome= FuneralHomeAddInfo=
RegistrarRecDateMo= RegistrarRecDay= RegistrarRecDateCC= RegistrarRecDateYY= CertifierType= CertifierLicenseNum=
MedExamLicenseNum= CertifierSignDateMo= CertifierSignDateDay= CertifierSignDateCC= CertifierSignDateYY= Autopsy=
AutopsyUsedForUCD= DeathManner= WorkInjury= CODQryCode= UCD= UCDGroupCode= CODEntAxis01= CODEntAxis02= CODEntAxis03=
CODEntAxis04= CODEntAxis05= CODEntAxis06= CODEntAxis07= CODEntAxis08= CODEntAxis09= CODEntAxis10= CODEntAxis11=
CODEntAxis12= CODEntAxis13= CODEntAxis14= CODEntAxis15= CODEntAxis16= CODEntAxis17= CODEntAxis18= CODEntAxis19=
CODEntAxis20= CODRecAxis01= CODRecAxis02= CODRecAxis03= CODRecAxis04= CODRecAxis05= CODRecAxis06= CODRecAxis07=
CODRecAxis08= CODRecAxis09= CODRecAxis10= CODRecAxis11= CODRecAxis12= CODRecAxis13= CODRecAxis14= CODRecAxis15=
CODRecAxis16= CODRecAxis17= CODRecAxis18= CODRecAxis19= CODRecAxis20= SystemDateMo= SystemDateDay= SystemDateYY=
DecInArmedForces= _ERROR_=1 _N_=1
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.D_OLD may be incomplete. When this step was stopped there were 0 observations and 116 variables.
WARNING: Data set WORK.D_OLD was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.45 seconds
cpu time 0.04 seconds
Here is the log when I placed the ZIP infile ahead of the non-Zipped Infile: NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24
25 GOPTIONS ACCESSIBLE;
26
27
28 DATA d_old;
29 LENGTH inputtype $1.
30 FN $500.
31 FN2 $250.;
32 INFILE DATALINES DSD delimiter='|';
33 INPUT inputtype $ FN $ FN2 $;
34
35 SELECT (inputtype);
36 WHEN ('Z') INFILE foo ZIP filevar=fn memvar=fn2 LRECL=603 end=done TRUNCOVER;
37 WHEN ('N') INFILE foo filevar=fn memvar=fn2 LRECL=603 end=done TRUNCOVER;
38 OTHERWISE;
39 END;
40
41
42 DO while (not done);
43 INPUT &datain.;
44 OUTPUT;
45 END;
46
47 DROP inputtype;
48
49 DATALINES;
ERROR: Invalid record format.
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
50 N|XXXXX|2011.
101 txt
inputtype=N FN=XXXXX FN2=2011.txt done=0
DeathPlaceStateCode= CertNumber= DecNameLast= DecNameFirst= DecNameMI= DecNameGenID= Soundex= AliasCode= Sex= DeathDateMo=
DeathDateDay= DeathDateCC= DeathDateYY= DecSSN= DecAgeUnit= DecAgeNumber= DecAgeMonths= DecAgeDays= DecAgeHours=
2 The SAS System 14:45 Friday, March 11, 2022
DecAgeMin= DecDOBMo= DecDOBDay= DecDOBCC= DecDOBYY= DecBirthPlaceStateCountryCode= DecInfCertNumTNBirth=
DecInfCertNumOOSBirth= DeathPlaceCode= DeathPlaceType= DeathPlaceCityCode= DeathPlaceCountyCode= DecMaritalStatus=
DecResStateCode= DecRaceSexWNU= DecRaceSexWBOU= DecResCity= DecResAddress= DecResCityLimitsInd= DecResZip= ResStateInd=
DecResCountyStateCode= DecResCityCode= ResCensusTract= DecHispanicOriginCode= DecRace= DecEducationYrs= DadNameLast=
DadNameFirst= MomNameMaidenLast= MomNameFirst= FuneralHomeCode= FuneralHomeCountyAbbrev= FuneralHome= FuneralHomeAddInfo=
RegistrarRecDateMo= RegistrarRecDay= RegistrarRecDateCC= RegistrarRecDateYY= CertifierType= CertifierLicenseNum=
MedExamLicenseNum= CertifierSignDateMo= CertifierSignDateDay= CertifierSignDateCC= CertifierSignDateYY= Autopsy=
AutopsyUsedForUCD= DeathManner= WorkInjury= CODQryCode= UCD= UCDGroupCode= CODEntAxis01= CODEntAxis02= CODEntAxis03=
CODEntAxis04= CODEntAxis05= CODEntAxis06= CODEntAxis07= CODEntAxis08= CODEntAxis09= CODEntAxis10= CODEntAxis11=
CODEntAxis12= CODEntAxis13= CODEntAxis14= CODEntAxis15= CODEntAxis16= CODEntAxis17= CODEntAxis18= CODEntAxis19=
CODEntAxis20= CODRecAxis01= CODRecAxis02= CODRecAxis03= CODRecAxis04= CODRecAxis05= CODRecAxis06= CODRecAxis07=
CODRecAxis08= CODRecAxis09= CODRecAxis10= CODRecAxis11= CODRecAxis12= CODRecAxis13= CODRecAxis14= CODRecAxis15=
CODRecAxis16= CODRecAxis17= CODRecAxis18= CODRecAxis19= CODRecAxis20= SystemDateMo= SystemDateDay= SystemDateYY=
DecInArmedForces= _ERROR_=1 _N_=1
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.D_OLD may be incomplete. When this step was stopped there were 0 observations and 116 variables.
WARNING: Data set WORK.D_OLD was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.28 seconds
cpu time 0.03 seconds Here it is when I place the ZIP files ahead of the non-zipped datalines. NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24
25 GOPTIONS ACCESSIBLE;
26
27 DATA d_old;
28 LENGTH inputtype $1.
29 FN $500.
30 FN2 $250.;
31 INFILE DATALINES DSD delimiter='|';
32 INPUT inputtype $ FN $ FN2 $;
33
34 SELECT (inputtype);
35 WHEN ('N') INFILE foo filevar=fn memvar=fn2 LRECL=603 end=done TRUNCOVER;
36 WHEN ('Z') INFILE foo ZIP filevar=fn memvar=fn2 LRECL=603 end=done TRUNCOVER;
37 OTHERWISE;
38 END;
39
40
41 DO while (not done);
42 INPUT &datain.;
43 OUTPUT;
44 END;
45
46 DROP inputtype;
47
48 DATALINES;
NOTE: The infile library FOO is:
Directory=N:\XXXXX\2000_2009.zip
NOTE: The infile FOO(2009.txt) is:
Filename=N:\XXXXX\2000_2009.zip,
Member Name=2009.txt
NOTE: The infile FOO(2008.txt) is:
2 The SAS System 14:45 Friday, March 11, 2022
Filename=N:\XXXXX\2000_2009.zip,
Member Name=2008.txt
NOTE: The infile FOO(2007.txt) is:
Filename=N:\XXXXX\2000_2009.zip,
Member Name=2007.txt
NOTE: The infile FOO(2006.txt) is:
Filename=N:\XXXXX\2000_2009.zip,
Member Name=2006.txt
NOTE: The infile FOO(2005.txt) is:
Filename=N:\XXXXX\2000_2009.zip,
Member Name=2005.txt
NOTE: The infile FOO(2004.txt) is:
Filename=N:\XXXXX\2000_2009.zip,
Member Name=2004.txt
NOTE: The infile FOO(2003.txt) is:
Filename=N:\XXXXX\2000_2009.zip,
Member Name=2003.txt
NOTE: The infile FOO(2002.txt) is:
Filename=N:\XXXXX\2000_2009.zip,
Member Name=2002.txt
NOTE: The infile FOO(2001.txt) is:
Filename=N:\XXXXX\2000_2009.zip,
Member Name=2001.txt
NOTE: The infile FOO(2000.txt) is:
Filename=N:\XXXXX\2000_2009.zip,
Member Name=2000.txt
ERROR: Invalid record format.
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
59 N|XXXX|2011.
101 txt
inputtype=N FN=XXXX FN2=2011.txt done=1
DeathPlaceStateCode= CertNumber= DecNameLast= DecNameFirst= DecNameMI= DecNameGenID= Soundex= AliasCode= Sex= DeathDateMo=
DeathDateDay= DeathDateCC= DeathDateYY= DecSSN= DecAgeUnit= DecAgeNumber= DecAgeMonths= DecAgeDays= DecAgeHours=
DecAgeMin= DecDOBMo= DecDOBDay= DecDOBCC= DecDOBYY= DecBirthPlaceStateCountryCode= DecInfCertNumTNBirth=
DecInfCertNumOOSBirth= DeathPlaceCode= DeathPlaceType= DeathPlaceCityCode= DeathPlaceCountyCode= DecMaritalStatus=
DecResStateCode= DecRaceSexWNU= DecRaceSexWBOU= DecResCity= DecResAddress= DecResCityLimitsInd= DecResZip= ResStateInd=
DecResCountyStateCode= DecResCityCode= ResCensusTract= DecHispanicOriginCode= DecRace= DecEducationYrs= DadNameLast=
DadNameFirst= MomNameMaidenLast= MomNameFirst= FuneralHomeCode= FuneralHomeCountyAbbrev= FuneralHome= FuneralHomeAddInfo=
RegistrarRecDateMo= RegistrarRecDay= RegistrarRecDateCC= RegistrarRecDateYY= CertifierType= CertifierLicenseNum=
MedExamLicenseNum= CertifierSignDateMo= CertifierSignDateDay= CertifierSignDateCC= CertifierSignDateYY= Autopsy=
AutopsyUsedForUCD= DeathManner= WorkInjury= CODQryCode= UCD= UCDGroupCode= CODEntAxis01= CODEntAxis02= CODEntAxis03=
CODEntAxis04= CODEntAxis05= CODEntAxis06= CODEntAxis07= CODEntAxis08= CODEntAxis09= CODEntAxis10= CODEntAxis11=
CODEntAxis12= CODEntAxis13= CODEntAxis14= CODEntAxis15= CODEntAxis16= CODEntAxis17= CODEntAxis18= CODEntAxis19=
CODEntAxis20= CODRecAxis01= CODRecAxis02= CODRecAxis03= CODRecAxis04= CODRecAxis05= CODRecAxis06= CODRecAxis07=
CODRecAxis08= CODRecAxis09= CODRecAxis10= CODRecAxis11= CODRecAxis12= CODRecAxis13= CODRecAxis14= CODRecAxis15=
CODRecAxis16= CODRecAxis17= CODRecAxis18= CODRecAxis19= CODRecAxis20= SystemDateMo= SystemDateDay= SystemDateYY=
DecInArmedForces= _ERROR_=1 _N_=11
NOTE: A total of 609274 records were read from the infile library FOO.
The minimum record length was 601.
3 The SAS System 14:45 Friday, March 11, 2022
The maximum record length was 602.
NOTE: 62147 records were read from the infile FOO(2009.txt).
The minimum record length was 602.
The maximum record length was 602.
NOTE: 62729 records were read from the infile FOO(2008.txt).
The minimum record length was 601.
The maximum record length was 601.
NOTE: 61067 records were read from the infile FOO(2007.txt).
The minimum record length was 601.
The maximum record length was 601.
NOTE: 60820 records were read from the infile FOO(2006.txt).
The minimum record length was 601.
The maximum record length was 601.
NOTE: 61422 records were read from the infile FOO(2005.txt).
The minimum record length was 601.
The maximum record length was 601.
NOTE: 59796 records were read from the infile FOO(2004.txt).
The minimum record length was 601.
The maximum record length was 601.
NOTE: 61421 records were read from the infile FOO(2003.txt).
The minimum record length was 601.
The maximum record length was 601.
NOTE: 60851 records were read from the infile FOO(2002.txt).
The minimum record length was 601.
The maximum record length was 601.
NOTE: 59459 records were read from the infile FOO(2001.txt).
The minimum record length was 601.
The maximum record length was 601.
NOTE: 59562 records were read from the infile FOO(2000.txt).
The minimum record length was 601.
The maximum record length was 601.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.D_OLD may be incomplete. When this step was stopped there were 609274 observations and 116 variables.
WARNING: Data set WORK.D_OLD was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 8.57 seconds
cpu time 3.92 seconds As side note &datain. is a macro variable detailing the 116 variables, it was been well tested to conform to the formatting of all years of the data listed here.
... View more