BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
CathyVI
Pyrite | Level 9

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*/

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.
40:1 RC
 
/*Code*/

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;

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

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.

 

View solution in original post

3 REPLIES 3
ballardw
Super User

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.

Kurt_Bremser
Super User

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.

Tom
Super User Tom
Super User

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.

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 520 views
  • 0 likes
  • 4 in conversation