BookmarkSubscribeRSS Feed
Virender
Calcite | Level 5

Hello,

 

I'm running as DDE sas code to get the refreshed data from sharepoint file. It was working file till last week but today it is giving me a error because of which it is not able to read the file.

 

ERROR: Physical file does not exist, excel|system.

 

Here is code and Log:


OPTIONS NOXWAIT NOXSYNC;
DATA _null_;
rc=system('start excel');
rc = sleep(10);
RUN;


filename cmds dde 'excel|system';


data _null_;
file cmds;
put '[open("'"C:\Users\Documents\owssvr.xlsx"'")]';
run;

data _null_;
file cmds;
put '[error("false")]';
put '[save.as("'"C:\Users\Documents\test.xlsx"'",51,"")]';
put '[quit]';
run;

 

Log:

 

OPTIONS NOXWAIT NOXSYNC;
 DATA _null_;
 rc=system('start excel');
 rc = sleep(60);
 RUN;

NOTE: DATA statement used (Total process time):
real time 1:00.18
cpu time 0.32 seconds




 filename cmds dde 'excel|system';


 data _null_;
 file cmds;
 put '[open("'"C:\Users\Documents\owssvr.xlsx"'")]';
 run;

ERROR: Physical file does not exist, excel|system.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.00 seconds



 data _null_;
 file cmds;
 put '[error("false")]';
 put '[save.as("'"C:\Users\Documents\test.xlsx"'",51,"")]';
 put '[quit]';
 run;

ERROR: Physical file does not exist, excel|system.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.01 seconds

 

I'm not sure what has changed because it was running perfectly till last week.

 

Thanks,

Virender

1 REPLY 1
ballardw
Super User

When code was working recently and the starts causing errors it is time to see what may have changed in your system configuration.

 

Verify that you get an Excel start from your first data _null_. Depending on  your working environment many SAS Admins or other IT folks will disable the ability to run X commands or SYSTEM functions. If the Excel program didn't start then you may need to check with your Admin/ IT about permission to run the system function.

 

If that is not the case, I know at least one other product, Cisco Jabber, that will interfere with DDE (as in completely breaks it). Check to see what new applications or services may have been installed or activated within the past week or so.

 

If it happens to be Cisco Jabber the work around is to KILL the process from Task manager, not just stop the active window, but go into task manager and kill the process before attempting any DDE code. You can manually restart Jabber after the SAS job.

 

I am not sure that Office 365 responds correctly either. I have not used DDE since we started using Office 365. If you are that could be another issue. I believe that the file type codes, such as the 51 in

put '[save.as("'"C:\Users\Documents\test.xlsx"'",51,"")]';

have also changed with Office 365.

 

I would suggest looking for another approach overall though as DDE is basically no longer supported and other programs also interfere with DDE.

 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

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
  • 1 reply
  • 1323 views
  • 0 likes
  • 2 in conversation