BookmarkSubscribeRSS Feed
ruchiy
Calcite | Level 5

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

4 REPLIES 4
ruchiy
Calcite | Level 5

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;

Kurt_Bremser
Super User

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.

RichardinOz
Quartz | Level 8

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 4 replies
  • 4131 views
  • 0 likes
  • 3 in conversation