Hello,
I have created three macro variables (presented bellow) and save the code in a process flow named AutoExec. I have tried to use these macro variables in a diffrent process flow in a querry builder and I had an error message (both process flows were part of the same project).
Is there a way to transfer macro variables between diffrent process flows (without using prompts)?
Is there a way to use Prompts to achieve the same results as the code I have bellow?
data _null_;
Extract_start=intnx('month',today(),-1,'b');
Extract_end=intnx('month',today(),-1,'e');
call symput('Date_RPT_From',put(Extract_start,date9.));
call symput('Date_RPT_To',put(Extract_end,date9.));
call symput('RunDate',put(today(),date9.));
run;
Thank you,
Madalin
What was the error?
And how are you using the macro variables?
You need to run the autoexec before the query builder executes.
Hi,
Thank you for your answer.
Please find bellow the log extract, including the error.
I have tried to use the macro variable in a query builder.
You have mentioned that I have to run the autoexec before the query builder executes. Can you please tell me more about this?
PROC SQL NOEXEC;
4 SELECT t1.Table
5 FROM MBMNTHM0.MCLAIM t1
6 WHERE t1.DATE >= &Date_RPT_From;
_
22
WARNING: Apparent symbolic reference DATE_RPT_FROM not resolved.
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant,
a missing value, BTRIM, INPUT, PUT, SUBSTRING, USER.
Thank you,
Madalin
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.