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 (October 2005, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 28 Oct 2005 12:47:06 -0400
Reply-To:     Steve Raimi <steven.raimi@GM.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Steve Raimi <steven.raimi@GM.COM>
Subject:      Re: Searching macrovar for a comma

Mark,

I'd tried inverting the logic as you suggest earlier, but I've since found out that there are other odd effects involved in this that hid progress. I also had to quote the source string(s) (thanks, Ian!), plus isolate the code into its own macro to prevent subsequent macros from loading (which caused weird effects when the unexpected comma was used). Thanks also to Ron Fehd and Peter Crawford (the latter a private reply) for your help. Here's the macro that's my final result:

%macro verify_entries; %if (%length(%sysfunc(compress(%quote(&targetds&targetvars),,fid))) > 0) %then %do; *targetds or targetvars has invalid delimiter; %put; %put; %put; %put; %put &errormarker; %put Targetds and/or targetvar macro variables have non-legal characters.; %put This could be caused by a delimiter other than a space between items.; %put Please correct entries and resubmit.; %put &errormarker; %put; %put; %put; %put; proc printto; run; %return; %end; %mend verify_entries;

%verify_entries

Steve Raimi GMAC Insurance


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