BookmarkSubscribeRSS Feed
raveena
Obsidian | Level 7
Hi,

I am trying to export the data by using DDE but getting error as below,

ERROR: DDE session not ready.
FATAL: Unrecoverable I/O error detected in the execution of the data step program.Aborted during the EXECUTION phase.

But I ran the same program on another machine , its getting exported without any errors.

Please let me know how to solve this error.

Thanks in Advance . Message was edited by: raveena
3 REPLIES 3
Quentin
Super User
Hi,
Can you tell us more? Are you using DDE to connect to word, excel, powpoint.? Is the same verion of MS whatever installed on both the PC where it works and the PC where itndoesnt work? Please send a section of the log showing the code you submitted and the error message.
--Q.
The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
raveena
Obsidian | Level 7
Hi Quentin,

I am using DDE, export data to excel file. Ya, we have installed the same version of MS office. The sample code is below,
* open excel ;
%macro dde_openExcel;
options noxsync noxwait;
filename sas2xl dde 'excel|system'; * reference to open/close excel ;
data _null_;
length fid rc start stop time 8;fid=fopen('sas2xl','s');
if (fid le 0) then do;
rc=system('start excel');
start=datetime();
stop=start+10;
do while (fid le 0);
fid=fopen('sas2xl','s');
time=datetime();
if (time ge stop) then fid=1;end;
end; rc=fclose(fid); run;
%mend dde_openExcel;

%macro dde_makeWorkbook(thepath=,thefile=);
filename sas2xl dde 'excel|system';
filename DDEcmds dde 'excel|system';
data _null_;
file sas2xls;
put '[error(false)]';
put %unquote(%bquote('[save.as("&thepath.\&thefile")]')); * save as ;
run;
%mend dde_makeWorkbook;

While running this macro am getting an error.

Thanks.
Quentin
Super User
Hi,
It's still not clear to me where you get an error. Can you send the log file?

When you call the first macro it should start excel. Does it work?

It looks like the second macro just tells execel to save the file. Excel has to be running in order for the second macro to work.

There are plenty of DDE folks on the SAS-L listserv who could help with this too : http://www.listserv.uga.edu/archives/sas-l.html

--Q.
The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1058 views
  • 0 likes
  • 2 in conversation