Altair personal slc infile statement fails to recognize the last record using end option
STRANGE ERROR. DNE IS A VALID VARIABLE NAME
1330      data null;
1331        infile "c:/temp/tst.txt" end=dne;
^
ERROR: DATA-step variable "dne" is not valid:
The first character must be a simple alphabetic (A-Z or a-z)
or underscore (_) character
1332        input;
1333        putlog infile;
1334        if dne then putlog "done";
1335      run;
COMPLETE TEST CASE
/--- CREATE TEST FILE ---/
data null;
file "c:/temp/tst.txt";
set sashelp.zipcode (obs=3);
put  zip city;
run;quit;
/*--- OUTPUT FILE
c:/temp/tst.txt
00501 Holtsville
00544 Holtsville
00601 Adjuntas
---*/
data null;
infile "c:/temp/tst.txt" end=dne;
input;
putlog infile;
if dne then putlog "done";
run;
LOG
1316
1317      data null;
1318        file "c:/temp/tst.txt";
1319        set sashelp.zipcode (obs=3);
1320        put  zip city;
1321      run;
NOTE: The file 'c:\temp\tst.txt' is:
Filename='c:\temp\tst.txt',
Owner Name=T7610\Roger,
File size (bytes)=0,
Create Time=14:10:30 Oct 22 2025,
Last Accessed=14:29:06 Oct 22 2025,
Last Modified=14:29:06 Oct 22 2025,
Lrecl=32767, Recfm=V
NOTE: 3 records were written to file 'c:\temp\tst.txt'
The minimum record length was 14
The maximum record length was 16
NOTE: 3 observations were read from "SASHELP.zipcode"
NOTE: The data step took :
real time : 0.003
cpu time  : 0.000
1321    !     quit;
1322
1323      /---
1324      c:/temp/tst.txt
1325
1326      00501 Holtsville
1327      00544 Holtsville
1328      00601 Adjuntas
1329      ---/
1330      data null;
1331        infile "c:/temp/tst.txt" end=dne;
^
ERROR: DATA-step variable "dne" is not valid:
The first character must be a simple alphabetic (A-Z or a-z)
or underscore (_) character
1332        input;
1333        putlog infile;
1334        if dne then putlog "done";
1335      run;
NOTE: DATA step was not executed because of errors detected
NOTE: The data step took :
real time : 0.000
cpu time  : 0.000
1335    !     quit;