Hi,
Please see if someone can help:-
When i am running following program it is running fine:-
filename example1 dde 'excel|System';
data _null_;
set load_time2;
file example1;
if ((final_delay)='No Delays') then do;
put '[select("R11C23")]';
put '[patterns(1,,6,true)]'; /* color it red */
end;
run;
However when i am trying to use macro variable for Row It is giveing me SAS DDE Error.
filename example1 dde 'excel|System';
data _null_;
set load_time2;
file example1;
if ((final_delay)='No Delays') then do;
put '[select("R&part.C23")]';
put '[patterns(1,,6,true)]'; /* color it red */
end;
run;
Please assist
Hi,
Assuming you have set up the macro variable with the required value, I suspect it is not resolving because of the single quotes that surround the put string.
Try using:
put '[select("R' "&part" 'C23")]';
Regards,
Amir.
Hi Amir,
Macro is resolving same as we required. However i suspect there might be some conflict netween DDE and MAcro engine.
Anybody can help?
manojinpec: You never posted the code showing how you are creating the macro variable &part. Your original code wouldn't have resolved correctly, anyhow, but Amir's solution did work if the macro variable had been created correctly. Did you test it using the mlogic symbolgen and mprint options?
I took dde out of the equation and ran the following to see if you were creating what you expected to create. You might want to try to do the same with your current code:
data load_time2;
informat final_delay $20.;
input final_delay &;
cards;
Some Delays
No Delay
No Delays
Lots of Delays
;
%let part=11;
data _null_;
set load_time2;
file "c:\testdde.txt";;
if ((final_delay)='No Delays') then do;
put '[select("R' "&part" 'C23")]';
put '[patterns(1,,6,true)]'; /* color it red */
end;
run;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.