From: xlr82sas on
On Feb 26, 11:29 pm, kuh...(a)126.COM (Clark An) wrote:
> Very interesting.

Hi Clark An,

I think we have answered your question. You cannot do the follwing
eithout macro code in the datasetep

X&i&j&k&l=i*j*k*l;

You can do it without macro code in SAS-IML, SCL, R and macro
The lag does not require symrefs, just set up another array
nn{2,3,4,5] n1-n120.

Regards
From: xlr82sas on
On Feb 27, 3:27 pm, xlr82sas <xlr82...(a)aol.com> wrote:
> On Feb 26, 11:29 pm, kuh...(a)126.COM (Clark An) wrote:
>
> > Very interesting.
>
> Hi Clark An,
>
>   I think we have answered your question. You cannot do the follwing
> eithout macro code in the datasetep
>
>      X&i&j&k&l=i*j*k*l;
>
>   You can do it without macro code in SAS-IML, SCL, R and macro
>   The lag does not require symrefs, just set up another array
> nn{2,3,4,5] n1-n120.
>
> Regards

Hi SAS-Lers,

SUMMARY DROP DOWN TO SCL

PLEASE CORRECT ME IF I PUT MY FOOT
IN MY MOUTH AGAIN, I AM NOT AN SCL EXPERT

1. You cannot enter, compile and
execute SCL code without using
the GUI at least once. In EG or without EG.
Since EG does not support
the GUI, technically you cannot use SCL in EG.
There are work arounds like using my drop down.

2. SCL cannot create datasets in the normal way
Data out;
set in;
runl;
proc sql;
create table out from table in
;quit;

3. It is normal in most languages to
have batch scripts that compile,
link edit and execute programs.
However with SCL SAS has decided to
requre developers to use the GUI(at least once).
I tried with my 'hokey-sleazy' code to script
these basic functions. Visual Basic/Eclipse script these
functions for you.

3. SCL does let you use models and new to create datasets.
I was wrong saying you could not create datasets in SCL.

4. I don't think SCL supports simple structures like
%macro mkedat(in,ot);
data &ot;
set &in;
rn;
%mend mkedat;
%mkedat(sasuser.class,class);

5. As far as SCL doing everything SAS can do,
You can do everthing that SCL can does with 0s and 1s.
From: Joe Whitehurst on
%macro mkedat(in,ot);
data &ot;
set &in;
rn;
%mend mkedat;
%mkedat(sasuser.class,class);

SAS Component Language version:

init:
length in ot $32;
in='inininininininininin';
ot='ototototototototot';

submit:
data &ot; *<<<<&ot and &in are _NOT_ macro variables and there are never
quoting issues with these SAS Component Language variables;
set &in;
run;
endsubmit;

return;

On Sat, Feb 27, 2010 at 6:48 PM, xlr82sas <xlr82sas(a)aol.com> wrote:

> On Feb 27, 3:27 pm, xlr82sas <xlr82...(a)aol.com> wrote:
> > On Feb 26, 11:29 pm, kuh...(a)126.COM (Clark An) wrote:
> >
> > > Very interesting.
> >
> > Hi Clark An,
> >
> > I think we have answered your question. You cannot do the follwing
> > eithout macro code in the datasetep
> >
> > X&i&j&k&l=i*j*k*l;
> >
> > You can do it without macro code in SAS-IML, SCL, R and macro
> > The lag does not require symrefs, just set up another array
> > nn{2,3,4,5] n1-n120.
> >
> > Regards
>
> Hi SAS-Lers,
>
> SUMMARY DROP DOWN TO SCL
>
> PLEASE CORRECT ME IF I PUT MY FOOT
> IN MY MOUTH AGAIN, I AM NOT AN SCL EXPERT
>
> 1. You cannot enter, compile and
> execute SCL code without using
> the GUI at least once. In EG or without EG.
> Since EG does not support
> the GUI, technically you cannot use SCL in EG.
> There are work arounds like using my drop down.
>
> 2. SCL cannot create datasets in the normal way
> Data out;
> set in;
> runl;
> proc sql;
> create table out from table in
> ;quit;
>
> 3. It is normal in most languages to
> have batch scripts that compile,
> link edit and execute programs.
> However with SCL SAS has decided to
> requre developers to use the GUI(at least once).
> I tried with my 'hokey-sleazy' code to script
> these basic functions. Visual Basic/Eclipse script these
> functions for you.
>
> 3. SCL does let you use models and new to create datasets.
> I was wrong saying you could not create datasets in SCL.
>
> 4. I don't think SCL supports simple structures like
> %macro mkedat(in,ot);
> data &ot;
> set &in;
> rn;
> %mend mkedat;
> %mkedat(sasuser.class,class);
>
> 5. As far as SCL doing everything SAS can do,
> You can do everthing that SCL can does with 0s and 1s.
>
From: xlr82sas on
On Mar 1, 8:38 am, joewhitehu...(a)GMAIL.COM (Joe Whitehurst) wrote:
> %macro mkedat(in,ot);
>         data &ot;
>           set &in;
>         rn;
>       %mend mkedat;
>       %mkedat(sasuser.class,class);
>
> SAS Component Language version:
>
> init:
> length in ot $32;
> in='inininininininininin';
> ot='ototototototototot';
>
> submit:
>    data &ot;  *<<<<&ot and &in are _NOT_ macro variables and there are never
> quoting issues with these SAS Component Language variables;
>   set &in;
> run;
> endsubmit;
>
> return;
>
>
>
> On Sat, Feb 27, 2010 at 6:48 PM, xlr82sas <xlr82...(a)aol.com> wrote:
> > On Feb 27, 3:27 pm, xlr82sas <xlr82...(a)aol.com> wrote:
> > > On Feb 26, 11:29 pm, kuh...(a)126.COM (Clark An) wrote:
>
> > > > Very interesting.
>
> > > Hi Clark An,
>
> > >   I think we have answered your question. You cannot do the follwing
> > > eithout macro code in the datasetep
>
> > >      X&i&j&k&l=i*j*k*l;
>
> > >   You can do it without macro code in SAS-IML, SCL, R and macro
> > >   The lag does not require symrefs, just set up another array
> > > nn{2,3,4,5] n1-n120.
>
> > > Regards
>
> > Hi SAS-Lers,
>
> > SUMMARY DROP DOWN TO SCL
>
> > PLEASE CORRECT ME IF I PUT MY FOOT
> > IN MY MOUTH AGAIN, I AM NOT AN SCL EXPERT
>
> > 1. You cannot enter, compile and
> >   execute SCL code without using
> >   the GUI at least once. In EG or without EG.
> >   Since EG does not support
> >   the GUI, technically you cannot use SCL in EG.
> >   There are work arounds like using my drop down.
>
> > 2. SCL cannot create datasets in the normal way
> >         Data out;
> >            set in;
> >         runl;
> >         proc sql;
> >            create table out from table in
> >         ;quit;
>
> > 3. It is normal in most languages to
> >   have batch scripts that compile,
> >   link edit and execute programs.
> >   However with SCL SAS has decided to
> >   requre developers to use the GUI(at least once).
> >   I tried with my 'hokey-sleazy' code to script
> >   these basic functions. Visual Basic/Eclipse script these
> >   functions for you.
>
> > 3. SCL does let you use models and new to create datasets.
> >   I was wrong saying you could not create datasets in SCL.
>
> > 4. I don't think SCL supports simple structures like
> >       %macro mkedat(in,ot);
> >         data &ot;
> >           set &in;
> >         rn;
> >       %mend mkedat;
> >       %mkedat(sasuser.class,class);
>
> > 5. As far as SCL doing everything SAS can do,
> >   You can do everthing that SCL can does with 0s and 1s.- Hide quoted text -
>
> - Show quoted text -

Thanks Joe for correcting me.

Looks like I put my foot in my mouth again.

I do agree with SCL programmers about the power of SCL.
However, sometimes simple macro code seems quite complex in SCL.

But then I am not an very good SCLprogrammer.

I just coiuld not get my head around something like this in SCL

%macro namren( nam,ren);
%do i=1 to 3;
data &nam.&i;
set sasuser.class(where=(name=&nam));
if mod(_n_,&i)=0;
rename age=&ren;
run;
%end;
%mend namren;

%namren(Mary,yrs);
%namren(John,yers);
%namren(James,yr);
%namren(Joan,years);


From: montura on
SAS SCL programming does not require a GUI - unless you consider SAS
V9 interactive "the GUI". SAS EG is not a prorgamming environment so
your entire perspetive is backwards right off the bat - a normal
condition for statisticians.

Data steps are not "normal" they are canned procedures specific to SAS
that allow custom programming.

You do not "DROP DOWN" to SCL. Base/SAS and macro are actually the
lowest level languge in the SAS platform. SCL is the wrapper that
allows Base/SAS to operate.

init:
dcl num xItem;
do xItem=1 to 100;
submit continue;
proc sql;
create table temp as
select *
from sashelp.adsmsg
where msgid=&xItem;
endsubmit;

if symgetn('sqlobs')=0 then do;
put "Zero observations for MSGID=" xItem;
end;
end;
return;

Please note that in SCL that SCL variables resolve like macro
variables but do not require multiple passes to fully resolve.
SAS/SCL is an actual programming language, not interpreted text like
Base/SAS and Macro. So that means a high level of programming skill is
required AND you will not be executing ASCII scripts as programs.


That last comment about 1's and 0's is pretty funny. If you were
around when colleges actually offered prorgamming 1's and 0's you
might find that less funny and more reality. All kidding aside, you
would find SCL programming easier if SAS Institute would upgrade AF
documentation. The online text is pretty much the worst in the world
for any programming language.

There is no macro that is easier to read than SCL.
SCL provides a LOT of addtional resources for error control and
exception reporting that takes a TON of programming in Macro.