LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2003, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 20 Jun 2003 11:53:51 -0400
Reply-To:     "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Subject:      Re: %nrbquote
Content-Type: text/plain; charset="iso-8859-1"

Wrap the stuff in single quotes and forget the quoting functions:

41 data _null_; 42 put 'x "gunzip &form..dat" ;'; 43 put '%include "&form..cmd" ;'; 44 put 'x "gzip &form..dat" ;'; 45 run;

x "gunzip &form..dat" ; %include "&form..cmd" ; x "gzip &form..dat" ;

-----Original Message----- From: SAS User [mailto:sas@SDAC.HARVARD.EDU] Sent: June 20, 2003 11:43 AM To: SAS-L@LISTSERV.UGA.EDU Subject: %nrbquote

I am trying to write a macro that will write a SAS program. I'm having a little trouble getting the lines:

x "gunzip &form..dat" ; %include "&form..cmd" ; x "gzip &form..dat" ;

to appear exactly like that in the file. I've tried just about every combination of %nrstr, %nrbquote, %bquote, %quote, %str, etc to get the quotes and the &form and %include to not resolve. Any assistance would be greatly appreciated. My last attempt of:

put "x %nrstr("gunzip %nrquote(&FORM)..dat");"; put "%nrstr(%include "%nrquote(&FORM)..cmd");"; put "x %nrstr("gzip %nrquote(&FORM)..dat");"/;

left me with the error:

171 + put "x %nrstr("gunzip %nrquote(&FORM)..dat");"; ERROR: Expected close parenthesis after macro function invocation not found.^MERROR: Expec ted close parenthesis after macro function invocation not found.^MERROR: Expected close pa renthesis after macro function invocation not found.

I wish there was a clearer description of the differences between the quoting macro functions. Does anyone know a good site for that? The SAS manuals are lacking. Thanks again.

-casey


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