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 (July 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 18 Jul 2007 11:33:36 -0400
Reply-To:     Nathaniel.Wooding@DOM.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject:      Re: Macro Fails in X Command
Comments: To: Paul St Louis <pstloui@DOT.STATE.TX.US>
In-Reply-To:  <200707181525.l6IAlGpY029666@mailgw.cc.uga.edu>
Content-Type: text/plain; charset="US-ASCII"

Paul

Here is an X command that I copied out of a working program. Note all the double quotes. This, too, runs on an XP pro box.

DATA _NULL_ ;

x "'C:\Program Files\Microsoft Office\Office11\EXCEL.EXE' ""u:\my sas files\NATSAS\DMR\CHESAPEAKE\&FILE..XLs""";

Nat

Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977

Paul St Louis <pstloui@DOT.STAT E.TX.US> To Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU Discussion" cc <SAS-L@LISTSERV.U GA.EDU> Subject Macro Fails in X Command

07/18/2007 11:25 AM

Please respond to Paul St Louis <pstloui@DOT.STAT E.TX.US>

I have SAS 9.1 on XP_Pro platform. Why does this code not work?

%let path=U:\Contract_Letting\Letting_Duties\General_Notes\TEST; %let file=G1073211.rtf;

data _null_; x %Str(%')copy "&path.&file" "&path.G1073211.DOC" %Str(%') ; run;

Error Message: --------------------------- Windows cannot find 'copy U:\Contract_Letting\Letting_Duties\General_Notes\TEST\G1073211.rtf U:\Contract_Letting\Letting_Duties\General_Notes\TEST\G1073211.DOC '. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search. ---------------------------

All my little % and ' and " seem to be set up right.

----------------------------------------- CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and/or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.


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