BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm using DDE to write to an Excel file. The code works fine from within Base
SAS and with batch submit but won't run from within Enterprise Guide. I get the following error:

16 * start Excel;
17 options noxwait noxsync;
ERROR: Shell escape is not valid in this SAS session.
18 x "'&req_dir\R100488 Template.xls'"
18 ! ;
19
20 filename excel1 dde "Excel|&req_dir\[R100488 Template.xls]Table 1!R4C1:R11C6" notab
20 ! recfm=v lrecl=32000;
ERROR: Insufficient authorization to access DDE.
ERROR: Error in the FILENAME statement.
21 data _null_;
22 set QC.All_Tabdata;
23 file excel1;
24 put Any_2795 (Any_2796 Any_2900 Count Percent) ('09'x);
25 run;

Does DDE not work from within EG?

Jeff
2 REPLIES 2
MikeWhit
Calcite | Level 5
by default, this ability is turned off. Runnig Shell commands on a Server is to avoided.

However, with you local server, you need to change the registry.
Cut and paste what you see below into a text file, call if Xcom.reg, and import this into your Reg my clicking the file. (There shold be three lines with text).

Or use regEdit, Back up your registry before modifiing in all cases.
This works with EG up to 4.1, as far as I know.

Good luck

Mike


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{440196D4-90F0-11D0-9F41-00A024BB830C}\LocalServer32]
@="C:\\PROGRA~1\\SAS\\SAS9~1.1\\SAS.EXE -config \"C:\\Program Files\\SAS\\SAS 9.1\\sasv9.cfg\" -objectserver -nologo -noterminal -xcmd"
ChrisHemedinger
Community Manager
Or try this approach:

http://blogs.sas.com/sasdummy/index.php?/archives/136-Using-the-X-and-SYSTASK-commands-from-SAS-Ente...

Chris
Become an Explorer! Join SAS Analytics Explorers to learn and complete challenges that earn rewards!

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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