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 (April 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 3 Apr 2006 15:13:50 -0500
Reply-To:     Jiann-Shiun Huang <Jiann-Shiun.Huang@AMERUS.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jiann-Shiun Huang <Jiann-Shiun.Huang@AMERUS.COM>
Subject:      Re: Double Quotes
Comments: To: Jules Bosch <jbosch1@OPTONLINE.NET>
Content-Type: text/plain; charset=US-ASCII

Jules:

Try the following:

rc=system("copy """ || &mac1 || """ """ || &mac2 || """");

There are four double quotes right after copy, four at the end and six in the middle. You also need to define mac1 and mac2 in pairs of single quotes, like

%let mac1 = 'c:\temp\abc table\gen.sas';

J S Huang 1-515-557-3987 fax 1-515-557-2422

>>> Jules Bosch <jbosch1@OPTONLINE.NET> 04/03/06 2:35 PM >>> &MAC1 is a contatenation via

%let pgmdir=c:\temp\abc table;

and &&pgmn&j, as in

%let mac1=&pgmdir\&&pgmn&j;

Thanks again,

Jules

----- Original Message ----- From: "Nordlund, Dan (DSHS)" <NordlDJ@dshs.wa.gov> Date: Monday, April 3, 2006 3:24 pm Subject: RE: Double Quotes

> > -----Original Message----- > > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > Behalf Of Jules > > Bosch > > Sent: Monday, April 03, 2006 11:55 AM > > To: SAS-L@LISTSERV.UGA.EDU > > Subject: Double Quotes > > > > I want to COPY a SAS program from one directory to a second and > I have two > > macro variable values as follows. > > > > &MAC1 identifies a directory with a space in the folder name as in > > c:\temp\abc table\gen.sas > > &MAC2 identifies the second directory as in c:\temp\newdir > > > > data _null_; > > rc=system("copy &mac1 &mac2"); > > put rc=; > > run; > > > > The above does not work and from reading the SAS-L archives, I > beliveve I > > need additional double quotes in the RC statement but can't seem to > > configure it correctly. The above does work when the directory > name is > > without spaces in the name. > > > > Any suggestions, please? > > > > TIA, > > > > > > Jules > > Jules, > > How are you assigning the path names to the macro variables? I > would try > adding single quotes to the macro values, e.g., > > %let MAC1 = 'c:\temp\abc table\gen.sas'; > > You could something similar if you are passing the path name as a > macroparameter > > Hope this helps, > > Dan > > Daniel J. Nordlund > Research and Data Analysis > Washington State Department of Social and Health Services > Olympia, WA 98504-5204 > > > >


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