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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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