Hi, I have one question on infinite loop. There are two programs, which are shown below.
Why does program A work fine but program B generates infinite loop? thanks.
Program A:
filename qtr1 ('c:\sasuser\month1.dat''c:\sasuser\month2.dat'
'c:\sasuser\month3.dat');
data work.firstqtr;
infile qtr1;
input Flight $ Origin $ Dest $
Date : date9. RevCargo : comma15.;
run;
Program B:
data work.quarter;
do Month = 9, 10, 11;
nextfile="c:\sasuser\month"
!!compress(put(Month,2.)!!".dat",' ');
do until (lastobs);
infile temp filevar=nextfile end=lastobs;
input Flight $ Origin $ Dest $ Date : date9.
RevCargo : comma15.;
output;
end;
end;
run;
... View more