BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
steilber
Calcite | Level 5

I have a macro that uses DDE to write an Excel workbook with several worksheets.  The name of the workbook is a concatenation of the path name, a string constant, and a macro variable that contains the product name.  I need to update the macro to add an invocation for a new product that has a slash in the name, as in %let product = 'Product This/That'.  For that run, the workbook is not created, and the message in the log is

ERROR: DDE session not ready.

FATAL: Unrecoverable I/O error detected in the execution phase of the DATA step program.

            Aborted during the EXECUTION phase.

I have tried %quote with the variable assignment, and the SYMBOLGEN parameter indicates that the variable is resolving correctly. I've also tried increasing the sleep time. The workbook appears to be correctly populated in my Excel display. The macro works fine for all other invocations in the SAS program, before and after this one. Does anyone have an idea about why it works for all the macro variable values except that one?

1 ACCEPTED SOLUTION

Accepted Solutions
art297
Opal | Level 21

If you are on some version of windows, I don't believe that character is valid in a filename as it is the indicator for a subdirectory.

View solution in original post

4 REPLIES 4
twocanbazza
Quartz | Level 8

Remove SAS from the picture and try and manually create a workbook and/or sheet, called  'Product This/That' - does it work?

steilber
Calcite | Level 5

No, it doesn't.  Thanks for the idea!  I thought only a backslash would be a problem, but that showed me the forward slash doesn't work either.

art297
Opal | Level 21

If you are on some version of windows, I don't believe that character is valid in a filename as it is the indicator for a subdirectory.

steilber
Calcite | Level 5

You are right!  I thought it would only balk at the backslash.  Thanks to you and to twocanbazza!  I've been trying to get past this problem for a long time.

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
  • 2976 views
  • 3 likes
  • 3 in conversation