Hello,
I am reading in an Access table with reason codes and then assigning them to global SAS variables. They are all stored as type text, but the issue I'm running into is that they seem to be randomly working.
data temp; set reason;
call symput('Week',weekReason);
call symput('Wslr',WslrRule);
call symput('St',StRule);
if _n_ = 8 then output;
%put _Global_
run;
Then I see that week and wslr have a value assigned while &St is null. If I look at data temp, StRule is UT and should not be null in the dataset. Also if I manually pass in a string with single quotes it does not work, but if I use double quotes it does. For example:
call symput('St',"UT"); <- works
call symput('St','UT'); <- does not work
Does anyone have any ideas why this is happening, or any suggestions for a workaround? This is driving me insane and I need to get it worked out.
Thank you!
I am reading in an Access table with reason codes and then assigning them to global SAS variables. They are all stored as type text, but the issue I'm running into is that they seem to be randomly working.
data temp; set reason;
call symput('Week',weekReason);
call symput('Wslr',WslrRule);
call symput('St',StRule);
if _n_ = 8 then output;
%put _Global_
run;
Then I see that week and wslr have a value assigned while &St is null. If I look at data temp, StRule is UT and should not be null in the dataset. Also if I manually pass in a string with single quotes it does not work, but if I use double quotes it does. For example:
call symput('St',"UT"); <- works
call symput('St','UT'); <- does not work
Does anyone have any ideas why this is happening, or any suggestions for a workaround? This is driving me insane and I need to get it worked out.
Thank you!