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.
BASUG is hosting free webinars Next up: Jane Eslinger presenting PROC REPORT and the ODS EXCEL destination on Mar 27 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
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.
BASUG is hosting free webinars Next up: Jane Eslinger presenting PROC REPORT and the ODS EXCEL destination on Mar 27 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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