BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am trying to write a sentence including a macro variable and a statistic (col1 in my data) but the sentence is truncated after the first space. ("Form" is just printed)

filename &myfile. dde "excel|T1!r&rstart.c1:r&rstart.c1";
data _null_;
file &myfile.;
set t1_R1;
put "Form &frm." ; /* actually want "'Form &frm. (N=' col1 ')'"*/
run;

I'm new to DDE (well SAS actually) and am not sure how to avoid this problem.
There are no issues when I print col1 or &frm. without spaces.
Ideas?
2 REPLIES 2
Oleg_L
Obsidian | Level 7
Greetings.

Try notab option.

[pre]
FILENAME rr DDE "EXCEL|Sheet1!R2C1:R3C2" notab ;
%let t=Some string of text;
data _NULL_;
file rr;
put "&t";
run;
[/pre]

Oleg. Message was edited by: Oleg_L
deleted_user
Not applicable
Thanks so much Oleg! My outputs are perfect now 🙂

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Discussion stats
  • 2 replies
  • 1074 views
  • 0 likes
  • 2 in conversation