LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 25 May 2007 14:04:31 +1000
Reply-To:     "Johnson, David" <David.Johnson@CBA.COM.AU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Johnson, David" <David.Johnson@CBA.COM.AU>
Subject:      Re: DDE Excel to SAS Limitation?
Content-Type: text/plain; charset="us-ascii"

I knew you'd comment on DDE Alan.

Interestingly enough we are working on a migration of projects at present, and the parts using DDE are causing us a little testing and work!!!

I was thinking of something else when I wrote Wait(), I meant one of the SAS data step functions Sleep() or WakeUp() with an appropriate time in the function.

In my case, the running applications check gives me a time I can substitute into the function call.

Kind regards

David

"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Alan Churchill Sent: Friday, 25 May 2007 1:56 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: DDE Excel to SAS Limitation?

DDE predates COM and COM is deprecated. Both are old and no longer considered good practice. Toss VBA into that camp as well.

Issuing a wait command is not the right approach IMO. How long should the app wait?

Alan

Alan Churchill Savian "Bridging SAS and Microsoft Technologies" www.savian.net

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Wensui Liu Sent: Thursday, May 24, 2007 9:37 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: DDE Excel to SAS Limitation?

good diagnosis! Especially when your pc is busy with other tasks. i've never tried wait(). instead, i used sleep(). i am not sure if DDE is old. actually, it interacts with VBA very well. i would say it is very handy.

On 5/24/07, Johnson, David <David.Johnson@cba.com.au> wrote: > > At the risk of earning the ire of those who think DDE is old > technology, I shall offer this. > > > Curtis, the last time I saw this error, my machine was busy, it was > using SMS to surface software, and it took a little longer for the SMS

> application to start Excel. > > Most people advise using a data step with a Wait() function to give > Excel time to start. I wrote a macro for the process that watched the

> running process list and terminated when it found Excel had been > started. > > > You probably don't need to go that far, just run the "RUNXL" data step

> and look at how long it takes Excel to open. > > Kind regards > > David > > > "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, > consectetur, adipisci velit..." > > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > Smith, Curtis, Mr, DCAA > Sent: Friday, 25 May 2007 1:40 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: DDE Excel to SAS Limitation? > > I've created some SAS code using DDE to import a series of Excel files. > The code works fine, generally. However, sometimes I get the following

> error, for which I cannot find a cause or pattern: > > ERROR: DDE session not ready. > FATAL: Unrecoverable I/O error detected in the execution of the data > step program. > Aborted during the EXECUTION phase. > > My DDE code looks like the following: > > filename runxl dde 'excel|system'; > data _null_; > file runxl; > openfile='[FILE-OPEN("c:\temp\'|| "&table." || '.xls")]'; > put openfile; > run; > filename xlin DDE > "excel|c:\temp\[&table..xls]&table.!r2c1:r65536c22"; > run; > %put &table.; > data work.table; > infile xlin dlm='09'x notab missover dsd; ... > > Any ideas how to solve the problem? > > Thanks. > > Curtis A. Smith > Supervisory Auditor > > ************** IMPORTANT MESSAGE ***************************** This > e-mail message is intended only for the addressee(s) and contains > information which may be confidential. > If you are not the intended recipient please advise the sender by > return email, do not use or disclose the contents, and delete the > message and any attachments from your system. Unless specifically > indicated, this email does not constitute formal advice or commitment > by the sender or the Commonwealth Bank of Australia (ABN 48 123 123 > 124) or its subsidiaries. > We can be contacted through our web site: commbank.com.au. > If you no longer wish to receive commercial electronic messages from > us, please reply to this e-mail by typing Unsubscribe in the subject > line. > ************************************************************** >

-- WenSui Liu A lousy statistician who happens to know a little programming (http://spaces.msn.com/statcompute/blog)

************** IMPORTANT MESSAGE ***************************** This e-mail message is intended only for the addressee(s) and contains information which may be confidential. If you are not the intended recipient please advise the sender by return email, do not use or disclose the contents, and delete the message and any attachments from your system. Unless specifically indicated, this email does not constitute formal advice or commitment by the sender or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. We can be contacted through our web site: commbank.com.au. If you no longer wish to receive commercial electronic messages from us, please reply to this e-mail by typing Unsubscribe in the subject line. **************************************************************


Back to: Top of message | Previous page | Main SAS-L page