Your filename is casEa and your infile is CasA (missing E) but could be a typo here?
Can you add the macro debugging options and post the full log?
Also, make sure the file has the data expected (open the CSV file or use a basic input to read a few lines).
Macro debugging options
options mprint mlogic;
Check the actual file contents:
data _null_;
infile 'path to csv file no macro variables.csv' dsd firstobs=2 dsd termstr = crlf dlm=',' lrecl=32767 missover;
input;
put _infile_;
run;
@SAS_usercanada wrote:
%macro infile;
%Do Yr .= &strYr %To EndYr;
Filename caseA "&sourcefile.\caseA_&Yr..CSV";
Data temp. caseA_&Yr.;
length
Filr_number $ 15
Rtn_cd $4
... ;
infile casA Firstobs = 2 DSD Termstr = CRLF DLM =',' LRECL=32767 Missover;
input
Filr_number $
Rtn_cd $
...;
informat
Filr_number $CHAR15.
Rtn_cd $CHAR1.
...;
format
Filr_number $CHAR15.
Rtn_cd $CHAR1.
...;
run;
%END;
%Mend;
%infile;
NOTE: The infile CaseA is: Filename=E:\Master file\CaseA_2020.CSV, RECFM=V,LRECL=32767, File Size (bytes)=8571503098, Last Modified=May 29, 2024 14:16:42, Create Time=May 29, 2024 14:16:42
NOTE: 0 records were read from the infile CaseA. NOTE: The data set temp.CaseA_2020 has 0 observations and 120 variables.
... View more