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 (December 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 27 Dec 2006 13:08:11 -0800
Reply-To:     "Duell, Bob" <bob.duell@CINGULAR.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Duell, Bob" <bob.duell@CINGULAR.COM>
Subject:      Quick macro question
In-Reply-To:  A<1167246916.760561.33020@48g2000cwx.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"

Hi all,

I have a macro parameter with a a value that looks like it contains operators, but in fact is a UNIX path (containing slashes). The macro complains about expecting a numeric operand when I reference the value in an IF statement. Here's a simple example:

%macro usr_files(file_system); %if &file_system = %str(/opt/app/SASwork1) %then %put Hello world; %else %put Goodbye cruel world; %mend;

My macro works only when if I use the %str() function on the parameter when it's called, i.e.

%usr_files( %str(/opt/app/SASwork1) ); /* works */ %usr_files( /opt/app/SASwork1 ); /* Does not work */

Anyone know of a "trick" to avoid using the %STR() function when I call the macro?

Thanks,

Bob


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