06-19-2008 10:16 PM
06-20-2008 12:06 PM
06-30-2008 04:11 AM
06-30-2008 05:21 AM
07-01-2008 01:49 AM
02-07-2017 12:00 AM
Thanks for your posting, I learned much from it. However, I am unable to follow this step:
"break up the string: &&out &previtem &&y".
Is there any particular reason to break the string in this way? I carefully read your explanation about the forward scan rule and the rescan rule and I think neither the forward scan rule and the rescan rule implies it. For example, let's consider the following code:
%let d = one;
For this case, how should I perform the step: break up the string? There seem no clear boundaries as the first example we can break the string up.
The below is my own understanding, please correct me if it is wrong: It seems that at one time, from left to right, SAS tries to resolve all the macro variables indicated by & simultaneously, so for the first example &&out&previtem&&y, in the first attempt (scan), SAS resolves "&&", "&previtem", and "&&" to "&", "1" and "&" respectively, while keeping "out" and "y" unchanged, producing
then starts the second scan. At this time, there are two and only two macro variables &out1 and &y, and will be resolved to "ay1". In
"ay1", no macro variable is detected, so the resolve procedure ends.
In my example "&&&&d", in the first scan, SAS resolves "&&" and "&&" to "&" and "&", leaving "&&d" for the second scan, which resolves to "&d", and finally "one".
Thanks again for your time.
06-20-2008 12:58 PM
06-20-2008 04:23 PM
06-23-2008 06:40 AM
06-23-2008 11:25 AM