Date: Mon, 24 Jul 2006 23:01:00 -0400
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: SCL Questions (hijacked thread)
Joe,
I'm can't recall the specifics of Ian's argument but, based on the same
logic, can SCL do what a macro similar to the one he proposed can do? For
example, in a non-scl data step, can it accomplish something like the
following?
libname test 'c:\';
*build test data;
data test.file1;
input x;
cards;
1
2
;
run;
data test.file2;
input x;
cards;
3
4
;
run;
data test.file3;
input x;
cards;
5
6
;
run;
%macro mklist(pref,from,to) ;
%local i ret ;
%do i = &from %to &to ;
%let ret = &ret &pref&i;
%end ;
&ret
%mend mklist ;
data one;
set %mklist(test.file,1,3);
run;
Just curious,
Art
-----------
On Mon, 24 Jul 2006 22:22:54 -0400, Joe Whitehurst
<joewhitehurst@GMAIL.COM> wrote:
>Ian,
>
>Upon, reflection, I'm still not sure what point you are trying to
>make. I hope you're not trying to say the functionality of the MKLIST
>macro cannot be replicated using SAS Component Language because it is
>trivially easy to do so:
>
>here is the basic part of the code without adding parameter passing,
>section labels and variable declarations;
>
>
>do i=from to to;
> ret=trim(ret)||pref||left(i)||suff;
>end;
>
> put ret=;
>
>Please tell me you are trying to make some other point.
>
>Joe
>
>On 7/24/06, Ian Whitlock <iw1junk@comcast.net> wrote:
>> TB, (True Believer: <http://tinyurl.com/pgs3h>)
>>
>> It was only two short weeks ago (http://tinyurl.com/jmqsm) that we
>> discussed
>>
>> > %macro mklist(pref=,from=1,to=1,suff=) ;
>> > %local i ret ;
>> > %do i = &from %to &to ;
>> > %let ret = &ret &pref&i&suff ;
>> > %end ;
>> > &ret
>> > %mend mklist ;
>>
>> Your first response was that it was SI's problem, they should implement
>> some form of
>>
>> set w1-w100 ;
>>
>> Then in a moment of clarity <http://tinyurl.com/hs5t6> you wrote:
>> > Ian,
>> >
>> > I think I see your problem. I think you want to make SAS Component
>> > Language fit into the Base SAS with Macro Paradigm for development
>> > which is why you have asked more than once for piecemeal
comparisons.
>> > To realize the significant advantages providebe effective in
>> > capitalizing on the far superior SAS Component Language Paradigm,
you
>> > will need to [sic]
>>
>> So now you want an example again. See the above.
>>
>> Ian Whitlock
>> ===================
>> Date: Sat, 22 Jul 2006 11:47:40 -0400
>> Reply-To: Joe Whitehurst <joewhitehurst@GMAIL.COM>
>> Sender: "SAS(r) Discussion"
>> From: Joe Whitehurst <joewhitehurst@GMAIL.COM>
>> Subject: Re: SCL Questions (hijacked thread)
>> Comments: To: Kevin Myers <KMyers@procominc.net>
>> Comments: cc: Alan Churchill <SASL001@savian.net>
>> In-Reply-To: <008f01c6ad7d$9b475b60$6502a8c0@speedy>
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>> Kevin,
>> I have just been trying to douse some of the enthusiasm with which
>> some MMMMs have been trying to promote the use of the Antiquated Macro
>> Language, and I believe I have had some small success! Some of the
>> MMMMs at least now mention SCL sort of as an afterthought when
>> suggesting alternative solutions to questions posted by obvious
>> neophytes. I understand and often use the Antiquated Macro Language
>> to generate SCL code. But, I have not seen a datastep pseudo function
>> created by the Antiquated Macro Language that I could not create with
>> SCL. Do you have an example handy?
>> Joe
>>
>> >
>> > I don't personally agree with Joe's "religious persecution" of macro
in
>> > favor of SCL. I even know of a few a things that macro can do which
SCL
>> > cannot do as well (for instance, you can use macros to effectively
create
>> > custom data step functions and even generate SCL code
>>
|