Date: Thu, 12 Nov 2009 15:56:34 -0500
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: Separating an ID from a Variable String
While I'm sure that you already have your needed solution, it was pointed
out to me (offline .. thanks again Howard) that that I had engaged in a
bit of unnecessary over-engineering.
The following does the same thing a lot more easily:
input FileName $ 1-38;
>One more suggestion: since your filenames may have extra hyphens, you
>always use a scan on the reverse of the filename. E.g.,
> input FileName $ 1-38;
> FinalID =reverse(scan(reverse(filename),2,'-'));
>On Tue, 10 Nov 2009 14:59:09 -0600, Craig Johnson <cjohns38@GMAIL.COM>
>>Thanks for your quick response. It looks like you had a similar idea as
>>Arthur and took it the extra step of conpensating for the number of
>>character separators like I posted after Arthur's suggestion. I ran the
>>code and it worked on the 464 files we have so it looks very promising.
>>Thanks to both of you for your help.