Desktop productivity for business analysts and programmers

Date prompt in a case statement

New Contributor
Posts: 2

Date prompt in a case statement



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:

when (t1.ASTHMA) = '1' and t1.ASTHMA_FIRST_RUN_DT < "&Curr_Per_Start"d
then 1 
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?


Super User
Posts: 24,010

Re: Date prompt in a case statement

Posted in reply to MandyV1217

What does  CURR_PER_START look like when it's resolved?


New Contributor
Posts: 2

Re: Date prompt in a case statement

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

Super Contributor
Posts: 320

Re: Date prompt in a case statement

[ Edited ]
Posted in reply to MandyV1217

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.

Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation