I am trying to call excel macro from sas 9.3 EG connection from my local server.
But I am getting the following error in the initial step itself of opening a excel. I am new to SAS DDE, please help me
17 %sysexec md "&path.Report";
18 options noxwait noxsync obs=max;
_______
13
ERROR 13-12: Unrecognized SAS option name NOXWAIT.
18 ! options noxwait noxsync obs=max;
_______
13
ERROR 13-12: Unrecognized SAS option name NOXSYNC.
19 X "'C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.exe'"
19 ! ;
Are you positively sure that you are connected to a workspace server on windows?
This error usually occurs on non-Windows platforms.
What happens if you do a simple
X "dir";
?
I am not getting anything
its simply saying
18
19 X "dir"
19 ! ;
20
21
22
23 %LET _CLIENTTASKLABEL=;
24 %LET _CLIENTPROJECTPATH=;
25 %LET _CLIENTPROJECTNAME=;
26 %LET _SASPROGRAMFILE=;
27
28 ;*';*";*/;quit;run;
29 ODS _ALL_ CLOSE;
30
31
32 QUIT; RUN;
Issuing
X "dir";
in my local SAS session (not EG) resulted in an open cmd window with the contents of the directory listing and a prompt (issued without noxwait).
Open your Server list, right mouse click on the active server, tab "Software", "View Initialization Log". This may give you a clue where the server actually resides.
Microsoft DDE only works when both the application issuing the DDE statements and the target application are on the same Windows platform. Typically, when using SAS EG, the core SAS application resides on a server (which may or may not be a Windows server) but the Excel instance is on a local machine. SAS EG, even though it is located locally, is not itself involved in DDE; it merely issues SAS code to the server to be executed. Use EG file import/export to move data between Excel and SAS.
Despite its many merits, (and many champions), DDE is legacy technology which, as you have found, is not scalable in a client server (EG) situation. Microsoft and others did toy with the idea of making it more generic but it didn't happen and we now have to find repoacement methods.
I have some sympathy for you if you have been given some code to run. You can only make DDE work if you have Base SAS (and Excel) installed on your desktop, or you can adapt the code to work on a Windows server where you have SAS. If your workplace can provide that, good. Otherwise you have been set a task you cannot complete.
Richard.
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!
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.
Ready to level-up your skills? Choose your own adventure.