I'm working on SAS 9.4 for Windows, looking at code similar to that below (though this has obviously been truncated): data People;
%let _EFIERR_ = 0;
infile 'C:\Users\Me\Desktop\People.txt' delimiter='|' MISSOVER DSD lrecl=32767 firstobs=2;
informat
name $20.
format
name $20.
Input
name $
if _Error_ then call symputx('EFIERR_',1);
run; Now to me, this basically says we are going to read in a text file and if there is an error then we'll set the macro variable _EFIERR_ to 1. But why? This appears to be the end of the code so what's the point? Does it attach itself to the resulting table some how? I've read some stuff and it seems as though _EFIERR_ is an actual global SAS variable so by doing this we are indicating an error has occurred. But I don't see why we need to set this to 1 in this code without doing anything with the variable. Also, does this variable get set to 1 if an error occurred at any point? Or is this variable "attached" or associated with each observation, and thus shows which observations had an error because their _EFIERR_ value will be 1?
... View more