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 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!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 1469 views
  • 0 likes
  • 2 in conversation