0

I have a very basic question
I build a query in SAS-EG so that it outputs var1, YEAR and MONTH values but

YEAR and MONTH values are prompt values(A and B respectively)

It works fine when I use SAS-EG GUI but the code below does not work when I

copy paste it into a new program.

If you help me I would really appreciate.

Thanks

 %_eg_conditional_dropds(want);
 PROC SQL;
 CREATE TABLE WORK.want AS 
    SELECT t1.YEAR, 
       t1.MONTH, 
       t1.var1, 
    FROM have t1
    WHERE %_eg_WhereParam( t1.MONTH, A, EQ, TYPE=S, IS_EXPLICIT=0 ) AND  %_eg_WhereParam( t1.YEAR, B, EQ, TYPE=S, IS_EXPLICIT=0 );
 QUIT;
andrey_sz
  • 751
  • 1
  • 13
  • 29
Jonsi Billups
  • 133
  • 1
  • 3
  • 15
  • How does it not work? What errors do you get and are those macros defined in your new program? – Reeza Oct 23 '15 at 08:37
  • @Reeza I do not get any errors but when I run the code program does not ask which month and year I should enter as prompts. It only outputs empty table. – Jonsi Billups Oct 23 '15 at 08:43

1 Answers1

0

Assuming that when you "copy paste it to a new program" you are still in the EG UI, try the following.

  1. Right click on the program icon in the EG flow and choose Properties from the context menu.
  2. Select "Prompts" from the left hand menu.
  3. "Add"
  4. select the required prompts.

Now when you run the program, you should get prompted for the Prompts.

JimL
  • 61
  • 3