Hi,
I am using SAS enterprise guide version 11 and I am trying to use a prompt within a case statement, and am getting a warning and an error:
WARNING: Apparent symbolic reference CURR_PER_START not resolved.
ERROR: Invalid date/time/datetime constant "&Curr_Per_Start"d.
Here is my case statement:
case
when (t1.ASTHMA) = '1' and t1.ASTHMA_FIRST_RUN_DT < "&Curr_Per_Start"d
then 1
else
0 end
The Curr_Per_Start prompt type is set as date. I had previously had a separate date prompt here which worked fine, but I am trying to use less prompts and am trying to point this case statement to a different prompt and now it won't work? Any ideas?
What does CURR_PER_START look like when it's resolved?
I found my problem... I forgot to add the prompt to the properties of my query. DUH!
Not sure what you mean by version 11, I'm fairly sure version 7 is the latest, but perhaps you mean 7.11.
This means that either you do not have the correct macro variable name for the prompt (did you misspell something), or that the prompt is not populated (did you check "required"), or most likely:
The prompt is probably not associated with that specific program node, and you did not check "use this prompt throughout the project". When you don't check that box, the prompt defines the macro variable inside the one node it is associated with, but then deletes that macro variable at the end of the program node.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.