Could you please help me to overcome the below NOTE in the log? Objective is to check for the string "BASECASE
" in the variable SCENARIO_ID
. If it not matches, then Output that record in the output
44 FLT_ID=7;
45 if SCENARIO_ID ne “BASECASE” then
46 output;
47 run;
NOTE: Variable '“BASECASE”'n is uninitialized
As @Tom pointed out in this thread, you should make sure to use the proper quotation marks and not the Windows Smart Quotes.
See below
data have;
SCENARIO_ID="BASECASE";
run;
data want;
set have;
*if SCENARIO_ID ne “BASECASE” then output;
if SCENARIO_ID ne "BASECASE" then output;
run;
As @Tom pointed out in this thread, you should make sure to use the proper quotation marks and not the Windows Smart Quotes.
See below
data have;
SCENARIO_ID="BASECASE";
run;
data want;
set have;
*if SCENARIO_ID ne “BASECASE” then output;
if SCENARIO_ID ne "BASECASE" then output;
run;
You committed the mistake of routing code through a word processor (somewhere in your development process) that replaced the correct double quotes with invalid "curly" ones.
This should work:
FLT_ID=7;
if SCENARIO_ID ne "BASECASE" then
output;
run;
If you share full code will be helpful but some time if your dataset is not having set statement then your original dataset is destroyed and start over.
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.