BookmarkSubscribeRSS Feed
MandyV1217
Calcite | Level 5

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?

 

3 REPLIES 3
Reeza
Super User

What does  CURR_PER_START look like when it's resolved?

 

MandyV1217
Calcite | Level 5

I found my problem... I forgot to add the prompt to the properties of my query.  DUH!

snoopy369
Barite | Level 11

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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1972 views
  • 2 likes
  • 3 in conversation