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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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