I am trying to bring in an external file into sas. This is my code but am getting this error. Not sure what this mean and how can I resolved it. Thanks.
/*Log*/
options msglevel=i nocenter linesize=254 mprint Source2 ;
libname inlib "filepathx" Access = readonly;
libname outlib "filepathy" ;
run;
FILENAME indata "filepathz";
data outlib.want;
INFILE indata;
run;
Are you running SAS directly using command line or SAS Display Manager? Or are you using SAS/Studio or Enterprise Guide (or some other interface) that submits the code to SAS for you?
From the snippet of the log you submitted it looks like the note is being generated by the code that is submitted by that application instead of the code from your actual program.
For example when I use SAS Studio via SAS ODA which is Release: 3.8 (Enterprise Edition)
And set the MSGLEVEL option to I instead of N then I get this bogus note in the SAS log:
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; INFO: Character variables have defaulted to a length of 200 at the places given by: (Line):(Column). Truncation can result. 38:1 RC 68
Which is generated by the hidden code that SAS/Studio submits before it submits my actual code.
You can turn on the option to have SAS show you the code that SAS/Studio generates and then you can see what statement is on line 38 that is causing the informational message.
35 DATA _NULL_; 36 CALL SYMPUT("GRAPHINIT",""); 37 CALL SYMPUT("GRAPHTERM",""); 38 RC=TSLVL('SASXGOPT','N'); 39 _ERROR_=0; 40 IF (RC^=' ') THEN DO; 41 CALL SYMPUT("GRAPHINIT","GOPTIONS RESET=ALL GSFNAME=_GSFNAME;"); 42 CALL SYMPUT("GRAPHTERM","GOPTIONS NOACCESSIBLE;"); 43 END; 44 RUN; INFO: Character variables have defaulted to a length of 200 at the places given by: (Line):(Column). Truncation can result. 38:1 RC NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
I yelled at SAS about that years ago. The fix is trivial, but they have not fixed it yet.
When you get errors the best thing to do is to copy the text of the code and all the messages, notes and errors from the log, open a text box on the forum using the </> icon above the message box and then paste the copied text.
From the code you show there are no paths or actual files referenced.
A library would reference a file location starting from a drive letter (Windows) or a disk mount point. Text like "filepathx" isn't going to cut it. If you are editing an actual path then don't as you are obfuscating.
This
data outlib.want;
INFILE indata;
run;
will create a dataset without any variables, as nothing is read. The INFILE statement defines a file handle, but does not read anything.
Are you running SAS directly using command line or SAS Display Manager? Or are you using SAS/Studio or Enterprise Guide (or some other interface) that submits the code to SAS for you?
From the snippet of the log you submitted it looks like the note is being generated by the code that is submitted by that application instead of the code from your actual program.
For example when I use SAS Studio via SAS ODA which is Release: 3.8 (Enterprise Edition)
And set the MSGLEVEL option to I instead of N then I get this bogus note in the SAS log:
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; INFO: Character variables have defaulted to a length of 200 at the places given by: (Line):(Column). Truncation can result. 38:1 RC 68
Which is generated by the hidden code that SAS/Studio submits before it submits my actual code.
You can turn on the option to have SAS show you the code that SAS/Studio generates and then you can see what statement is on line 38 that is causing the informational message.
35 DATA _NULL_; 36 CALL SYMPUT("GRAPHINIT",""); 37 CALL SYMPUT("GRAPHTERM",""); 38 RC=TSLVL('SASXGOPT','N'); 39 _ERROR_=0; 40 IF (RC^=' ') THEN DO; 41 CALL SYMPUT("GRAPHINIT","GOPTIONS RESET=ALL GSFNAME=_GSFNAME;"); 42 CALL SYMPUT("GRAPHTERM","GOPTIONS NOACCESSIBLE;"); 43 END; 44 RUN; INFO: Character variables have defaulted to a length of 200 at the places given by: (Line):(Column). Truncation can result. 38:1 RC NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
I yelled at SAS about that years ago. The fix is trivial, but they have not fixed it yet.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.