Reputation: 11
I am attempting to format variables in SAS studio which have been truncated due to the name being longer than 32 characters, when I attempt to format the variables in SAS studio it gives the warning 'this variable in uninitialized'. when I run the same code in SAS EG against the same excel document imported, the code works fine and formats the variable. Why would the same code in SAS studio not work?
code:
data test; set test1; format 'variable'n best12.; run;
Upvotes: 0
Views: 310
Reputation: 21294
The code won’t be the same because you’re using two different applications with different default settings most likely. As someone else indicated, it’s likely the validvarname option that’s the issue. I would recommend setting it to V7 which avoids these issues. With this setting, SAS converts them to valid variable names by default and you can avoid the rename step entirely.
Supposedly the 32 char limit will be lifted in SAS 9.5. No release date has been announced, SAS 9.4 M5 was recently released so I’m not expecting it super soon.
Upvotes: 0
Reputation: 27518
Two common ways to view the current setting of an option. Proc OPTIONS
or function GetOption
proc options option=validvarname;
run;
%put %sysfunc(getoption(validvarname));
Upvotes: 1
Reputation: 9109
Compare the value of option VALIDVARNAME in EG vs Studio. Set it in studio to the same as EG.
Upvotes: 1