Date: Thu, 26 Jan 2006 12:59:58 -0500
Reply-To: Charles Patridge <charles_s_patridge@PRODIGY.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Charles Patridge <charles_s_patridge@PRODIGY.NET>
Subject: Re: Is there a better or more efficient method to use???
Dear Richard,
Thanks for taking the time to answer my question.
I was spending time on your first possible solution and do not know very
much about HASH objects in V9. After playing around with some of your
code, I am not sure I still understand completely how HASH objects can
handle my situation.
I then saw your 2nd posting and notice creating sub hash tables could be a
possibility but looking at this caused me to shiver in how anyone else
would maintain/modify my code in the future if needed.
Your Proc Format Solution is not really what I can use even though I
thought about using myself.
The sticky point I had in mind was to see if a shorter string existed in
my TRIGGER file that is contained in a string that is currently being read
in a data step.
I was thinking the CONTAIN function would be nice at first but it is NOT
able to handle a LIST of Data Values and it would only work for LONGER
STRINGS than was is being investigated.
I will still try to learn more about HASH Objects but they seem to be
awkward to work with for this situation or I need to learn a great deal
more about them.
In any case, I am going to stick with my current solution even though I
know it has its problems.
Would be nice to have a function that would take a list of DATA Values and
have those values checked to see if they are contained in the left
argument such as:
result = New_function( 'SEND FILE TO CHUCK AND', 'SEND TO CHUCK', 'FILE TO
CHUCK','FORWARD TO CHUCK');
the above would result in a '2' since the 3rd parameter (which is actually
the 2nd string in list of data values) is 'FILE TO CHUCK' contained in the
1st parameter 'SEND FILE TO CHUCK AND'
otherwise, a '0' is returned if none of the list of data values are
contained in the first argument.
Again, thanks for your time and effort - I appreciate it and sorry I have
not responded sooner.
Best Regards,
Charles Patridge
charles_s_patridge at prodigy DOT Net