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 (August 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 4 Aug 2004 16:43:12 -0400
Reply-To:     "Fehd, Ronald J. (PHPPO)" <RJF2@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Fehd, Ronald J. (PHPPO)" <RJF2@CDC.GOV>
Subject:      Re: question on %substr(&arg1,&arg2,&arg3)
Content-Type: text/plain; charset="US-ASCII"

> From: Ben > Hi,How could I check if the last character of a path is '/' > using Macro facility?

%Let Path = c:\temp\; %Let slash = %substr(&Path,%length(&Path.),1); %Put Slash<&Slash.>;

*you need the macro in the archives below; %Put the last character of Path<&Path.> is %ifthen(&Slash. eq \ ,true = ,false=knot ) a slash;

check our most excellent archives: http://www.listserv.uga.edu/archives/sas-l.html search for: ifthen substring search: [X] subject contains: author's address: RJF2 since: Jun 2004 until:

within a macro: %if %substr(&Path,%length(&Path.),1) eq \ %then ...;

Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov


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