From: Randy Herbison on 25 Feb 2010 11:28 Hi, Creating the catalog is easy. You can use the FILENAME statement's CATALOG access method to write the SCL source to a new catalog. But, I don 't know of a way to create the SCL entry from scratch. What I've done is use an existing reusable SCL entry, which has a single %INCLUDE statement, to compile the SCL, and then copy the compiled SCL to a new SCL entry. Can you post the code that creates your user-defined functions? I'm interested in seeing how the SCL gets compiled. Thanks, Randy -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of xlr82sas Sent: Wednesday, February 24, 2010 8:48 PM To: SAS-L(a)LISTSERV.UGA.EDU Subject: Re: Drop down to SCL and R in your datastep On Feb 23, 7:27 pm, xlr82sas <xlr82...(a)aol.com> wrote: > Hi SAS-Lers, > > Clark An posed this problem > > data mat; > do i=1 to 10; > do j=1 to 15; > do k=1 to 100; > do l=1 to 20; > do m=1 to 17; > do n=1 to 23; > X&i&j&k&l&m&n=&i+&j+&k+&l+&m+&n; > output; > end; > end; > end; > end; > end; > end; > run; > > ================================ > > http://homepage.mac.com/magdelina/.Public/utl.html > > utl_tipweb.txt > T005260 DROP DOWN TO SCL IN YOUR DATASTEP > > Here is a SCL solution using FCMP and macros on my site. > There are many implications, perhaps this is a more > powerful than the macro language. > > Note there is no flashing command window. This is lights out solution. > No troublesome GUI to deal with. Good error messages in you log from > SCL. > However, this will not work in EG and you can't imbed widgets. > > data mat2345; > array x[2,3,4,5] x1-x120; > do i=1 to 2; > do j=1 to 3; > do k=1 to 4; > do l=1 to 5; > x[i,j,k,l]=i*j*k*l; > output; > end; > end; > end; > end; > run; > > /* this datastep renames x1-x120 to X1111-X2345 */ > /* SCL is a much more powerful language then macro */ > /* Just put your SCL code after pgm= */ > /* SAS 9.2 Windows 2000 */ > data _null_; > length pgm $1024; > /* SCL program to rename variables - no macro */ > pgm=compbl(" > init: > dsid=open('mat2345','v'); > if dsid then do; > varn=0; > do i=1 to 2; > do j=1 to 3; > do k=1 to 4; > do l=1 to 5; > varn=varn+1; > nam=cats('X',put(i,1.),put(j,1.),put(k,1.),put(l,1.)); > xx=cats('X',put(varn,3.)); > rc=modvar(dsid,xx,nam); > end; > end; > end; > end; > end; > rc=close(dsid); > return;"); > call pgmutl(pgm); > call sclxeq; > run; > > # Variable Type Len > > 1 X1111 Num 8 > 2 X1112 Num 8 > 3 X1113 Num 8 > 4 X1114 Num 8 > 5 X1115 Num 8 > 6 X1121 Num 8 > > ============================ > /* IML solution */ > > proc iml; > x=shape({0} ,1,120,0); > n=shape({' '},1,120,'x0000'); > print n; > idx=0; > do i = 1 to 2; > do j = 1 to 3; > do k = 1 to 4; > do l = 1 to 5; > idx=idx+1; > x[1,idx]=1000*i+100*j+10*k+l; > n[1,idx]=cats('x',char(i,1,0), > char(j,1,0),char(k,1,0),char(l,1,0)); > end; > end; > end; > end; > create mat2345 from x[colname=n]; > append from x; > close mat2345; > quit; > run; > > proc contents; > run; > > Alphabetic List of Variables and Attributes > > # Variable Type Len > > 1 X1111 Num 8 > 2 X1112 Num 8 > 3 X1113 Num 8 > > =================================== > Here is the R solution > > data _null_; > length pgm $1024; > /* R CODE */ > pgm=compbl(" > library(SASxport); > library(foreign); > vv<-list(); > vr="s0000"; > vv<-list(); > vv[vr]<-0; > mat2345=vv; > for (i in 1:2) {; > for (j in 1:3) {; > for (k in 1:4) {; > for (l in 1:5) {; > vr=paste('x',as.character(i),as.character(j), > as.character(k),as.character(l),sep=''); > vv[[vr]]<-i+j; > may2345=data.frame(mat2345,vv); > }; > }; > }; > }; > beg; > write.xport(mat2345,file='C:\\utl\ > \mat2345.xpt',autogen.formats=FALSE);" > ); > call rxeq(pgm); > call getxpt('mat2345'); /* get the detail data from R */ > run; > > proc contents data=mat2345; > run; > > Alphabetic List of Variables and Attributes > > # Variable Type Len > > 1 X1111 Num 8 > 2 X1112 Num 8 > 3 X1113 Num 8 > 4 X1114 Num 8 > 5 X1115 Num 8 > 6 X1121 Num 8 > 7 X1122 Num 8 > > ========================================== > > Future projects drop down to perl and a Java interface to R. Hi SAS-Lers, I may have been wrong when I said 'DROP DOWN TO SCL' will not work in EG, however I don't know how one could do it properly without at least starting one SCL GUI interface. My sleazy method of creating an scl catalog from a binary file required me to do the GUI thing at least once. I think you would need to go into the GUI on the server at least once, and I don't see how this is possible in EG. SCL experts please correct me if I am wrong? I would be very interested in bootstrap method to create an initial SCL catalog and SCL program without the GUI. No cheating, you cannot copy a catalog from some other location or flash a command window. You application has to work batch lights out on the server and client. The GUI and flasing command window has prevented me from using SCL in the past. Interestingly, my method may open up possibilites for EG and SCL. We just need a set of catlogs or different environments.
From: montura on 25 Feb 2010 12:37 There are SCL commands that will create and compile new SCL entries. However, the need for that kind of code generation is probably far beyond the very basic needs here. Generating SCL code from within a data step is a sign the programmer is hacking and fumbling for quick and dirty answers. That example of R source code can be coded in SCL objects, without the need for R at all. The only SCL code that requires a GUI are widgets and other SAS/Frame related functions. All other SCL code runs on the backend server, hands off.
From: xlr82sas on 25 Feb 2010 17:27 On Feb 25, 10:04 am, xlr82sas <xlr82...(a)aol.com> wrote: > On Feb 25, 8:28 am, RandyHerbi...(a)WESTAT.COM (Randy Herbison) wrote: > > > > > > > Hi, > > > Creating the catalog is easy. You can use the FILENAME statement's CATALOG access method to write the SCL source to a new catalog. But, I don 't know of a way to create the SCL entry from scratch. What I've done is use an existing reusable SCL entry, which has a single %INCLUDE statement, to compile the SCL, and then copy the compiled SCL to a new SCL entry. > > > Can you post the code that creates your user-defined functions? I'm interested in seeing how the SCL gets compiled. > > > Thanks, > > Randy > > > -----Original Message----- > > From: SAS(r) Discussion [mailto:SA...(a)LISTSERV.UGA.EDU] On Behalf Of xlr82sas > > Sent: Wednesday, February 24, 2010 8:48 PM > > To: SA...(a)LISTSERV.UGA.EDU > > Subject: Re: Drop down to SCL and R in your datastep > > > On Feb 23, 7:27 pm, xlr82sas <xlr82...(a)aol.com> wrote: > > > Hi SAS-Lers, > > > > Clark An posed this problem > > > > data mat; > > > do i=1 to 10; > > > do j=1 to 15; > > > do k=1 to 100; > > > do l=1 to 20; > > > do m=1 to 17; > > > do n=1 to 23; > > > X&i&j&k&l&m&n=&i+&j+&k+&l+&m+&n; > > > output; > > > end; > > > end; > > > end; > > > end; > > > end; > > > end; > > > run; > > > > ================================ > > > >http://homepage.mac.com/magdelina/.Public/utl.html > > > > utl_tipweb.txt > > > T005260 DROP DOWN TO SCL IN YOUR DATASTEP > > > > Here is a SCL solution using FCMP and macros on my site. > > > There are many implications, perhaps this is a more > > > powerful than the macro language. > > > > Note there is no flashing command window. This is lights out solution.. > > > No troublesome GUI to deal with. Good error messages in you log from > > > SCL. > > > However, this will not work in EG and you can't imbed widgets. > > > > data mat2345; > > > array x[2,3,4,5] x1-x120; > > > do i=1 to 2; > > > do j=1 to 3; > > > do k=1 to 4; > > > do l=1 to 5; > > > x[i,j,k,l]=i*j*k*l; > > > output; > > > end; > > > end; > > > end; > > > end; > > > run; > > > > /* this datastep renames x1-x120 to X1111-X2345 */ > > > /* SCL is a much more powerful language then macro */ > > > /* Just put your SCL code after pgm= */ > > > /* SAS 9.2 Windows 2000 */ > > > data _null_; > > > length pgm $1024; > > > /* SCL program to rename variables - no macro */ > > > pgm=compbl(" > > > init: > > > dsid=open('mat2345','v'); > > > if dsid then do; > > > varn=0; > > > do i=1 to 2; > > > do j=1 to 3; > > > do k=1 to 4; > > > do l=1 to 5; > > > varn=varn+1; > > > nam=cats('X',put(i,1.),put(j,1.),put(k,1.),put(l,1.)); > > > xx=cats('X',put(varn,3.)); > > > rc=modvar(dsid,xx,nam); > > > end; > > > end; > > > end; > > > end; > > > end; > > > rc=close(dsid); > > > return;"); > > > call pgmutl(pgm); > > > call sclxeq; > > > run; > > > > # Variable Type Len > > > > 1 X1111 Num 8 > > > 2 X1112 Num 8 > > > 3 X1113 Num 8 > > > 4 X1114 Num 8 > > > 5 X1115 Num 8 > > > 6 X1121 Num 8 > > > > ============================ > > > /* IML solution */ > > > > proc iml; > > > x=shape({0} ,1,120,0); > > > n=shape({' '},1,120,'x0000'); > > > print n; > > > idx=0; > > > do i = 1 to 2; > > > do j = 1 to 3; > > > do k = 1 to 4; > > > do l = 1 to 5; > > > idx=idx+1; > > > x[1,idx]=1000*i+100*j+10*k+l; > > > n[1,idx]=cats('x',char(i,1,0), > > > char(j,1,0),char(k,1,0),char(l,1,0)); > > > end; > > > end; > > > end; > > > end; > > > create mat2345 from x[colname=n]; > > > append from x; > > > close mat2345; > > > quit; > > > run; > > > > proc contents; > > > run; > > > > Alphabetic List of Variables and Attributes > > > > # Variable Type Len > > > > 1 X1111 Num 8 > > > 2 X1112 Num 8 > > > 3 X1113 Num 8 > > > > =================================== > > > Here is the R solution > > > > data _null_; > > > length pgm $1024; > > > /* R CODE */ > > > pgm=compbl(" > > > library(SASxport); > > > library(foreign); > > > vv<-list(); > > > vr="s0000"; > > > vv<-list(); > > > vv[vr]<-0; > > > mat2345=vv; > > > for (i in 1:2) {; > > > for (j in 1:3) {; > > > for (k in 1:4) {; > > > for (l in 1:5) {; > > > vr=paste('x',as.character(i),as.character(j), > > > as.character(k),as.character(l),sep=''); > > > vv[[vr]]<-i+j; > > > may2345=data.frame(mat2345,vv); > > > }; > > > }; > > > }; > > > }; > > > beg; > > > write.xport(mat2345,file='C:\\utl\ > > > \mat2345.xpt',autogen.formats=FALSE);" > > > ); > > > call rxeq(pgm); > > > call getxpt('mat2345'); /* get the detail data from R */ > > > run; > > > > proc contents data=mat2345; > > > run; > > > > Alphabetic List of Variables and Attributes > > > > # Variable Type Len > > > > 1 X1111 Num 8 > > > 2 X1112 Num 8 > > > 3 X1113 Num 8 > > > 4 X1114 Num 8 > > > 5 X1115 Num 8 > > > 6 X1121 Num 8 > > > 7 X1122 Num 8 > > > > ========================================== > > > > Future projects drop down to perl and a Java interface to R. > > > Hi SAS-Lers, > > > I may have been wrong when I said 'DROP DOWN TO SCL' will not work > > in EG, however I don't know how one could do it properly without at > > least starting one SCL GUI interface. My sleazy method of creating an > > scl catalog from a binary file required me to do the GUI thing at > > least once. I think you would need to go into the GUI on the server at > > least once, and I don't see how this is possible in EG. > > > SCL experts please correct me if I am wrong? > > > I would be very interested in bootstrap method to create an initial > > SCL catalog and SCL program without the GUI. No cheating, you cannot > > copy a catalog from some other location or flash a command window. You > > application has to work batch lights out on the server and client. The > > GUI and flasing command window has prevented me from using SCL in the > > past. > > > Interestingly, my method may open up possibilites for EG and SCL. We > > just need a set of catlogs or different environments.- Hide quoted text - > > > - Show quoted text - > > Just some quick answers > > Randy, > > Thanks for bringing up some critical details for discussion. > > Was the existing SCL entry created using the GUI? If that is the case > then EG could not have been used to create the initial SCL program. I > used SCL entry and catalog incorrectly. I was thinking of the SCL > entry(program). > > Clark An > > I think the lag&n(n) is trivial if you create an array n[*] n1-n120 > and load the array with whatever you want and set up a second set of > DOs to access the elements however you want. There would be no symrefs > in this case. > > Randy, > > All the code is on my site, below is the 'prototype' R and SCL > code. This is not production level code, programmers should add things > like argument checking and remove ';' restrictions, 1024 byte > program limit and probaly reduce the number of calls to FCMP. These > are doable. Basically the code was done as a 'proof of concept'. Here > are the links to related material. I am busier than a one armed paper > hanger in a windstorm, so if any body wants to help me clean up the > code, they are welcome. I want to thank others who have worked offline > with me to 'correct and improve' my tips over the last few months, you > know who you are > > For a cleaner version see: > > http://homepage.mac.com/magdelina/.Public/utl.html > utl_tipweb.txt > > * T005210 DROP DOWN TO R IN A DATASTEP FCMP > RUN_MACRO > * T005220 GENERATING VARIABLE NAMES INSIDE THE DATASTEP USING R FCMP > RUN_MACRO > * T005260 DROP DOWN TOP SCL IN A DATASTEP FCMP > RUN_MACRO > * T005270 USEFUL SCL COMMANDS FOR NON AF BATCH > PROCESSING > > ==================================================================================================================== > > Here is all the ugly code > > /* T005210 DROP DOWN TO R IN A DATASTEP > The code lets you do general Analysis of Variance and least squares > without SAS-Stat > I use the Zelig package in R which seems very powerful ie Mixed and > Non linear modeling? > > data null somedata; > set sashelp.class; > output somedata; > run; > > data results; > set null somedata open=defer; * IF YOU DO THIS BE CAREFUL OF > LOOPING ; > * do some sas processing on somedata; > ...... SAS code > * do some R processing on somedata V5 xport dataset equivalent > in R > ...... R code > * do some SAS processing on datasets from R > ...... SAS code > * create same addditional datasets using SAS > run; > > Actually it may be better not to work on the same dataset in R and > SAS within the same datastep. > Also it might be better not to work on the datasets back from R in > the same datastep. > This simpler structure might be better; > /* C:\utl\ needs to exist and it should be the PWD - you can > use a macro variable */ > data _null_; > > read more »- Hide quoted text - > > - Show quoted text -... Hi Montura, Thanks you for your comments. Considering that EG does not support the development GUI, what are the options for SCL developers in EG? Consider the programmer has a brand new AF/SCL install and wants to run my rename. Can you post code that will create an SCL catalog and entry like my pgm2scl or some other scl entry from scratch and not using the GUI. Also there are other interesting things you can do within a datastep, especially since you cannot create SAS datasets in SCL. Regards
From: xlr82sas on 25 Feb 2010 17:38 Reposting because google seemed to bury my response? Hi Montura, Thanks you for your comments. Considering that EG does not support the development GUI, what are the options for SCL developers in EG? Consider the programmer has a brand new AF/SCL install and wants to run my rename. Can you post code that will create an SCL catalog and entry like my pgm2scl or some other scl entry from scratch and not using the GUI. Also there are other interesting things you can do within a datastep, especially since you cannot create SAS datasets in SCL. Regards On Feb 25, 2:27 pm, xlr82sas <xlr82...(a)aol.com> wrote: > On Feb 25, 10:04 am, xlr82sas <xlr82...(a)aol.com> wrote: > > > > > On Feb 25, 8:28 am, RandyHerbi...(a)WESTAT.COM (Randy Herbison) wrote: > > > > Hi, > > > > Creating the catalog is easy. You can use the FILENAME statement's CATALOG access method to write the SCL source to a new catalog. But, I don 't know of a way to create the SCL entry from scratch. What I've done is use an existing reusable SCL entry, which has a single %INCLUDE statement, to compile the SCL, and then copy the compiled SCL to a new SCL entry. > > > > Can you post the code that creates your user-defined functions? I'm interested in seeing how the SCL gets compiled. > > > > Thanks, > > > Randy > > > > -----Original Message----- > > > From: SAS(r) Discussion [mailto:SA...(a)LISTSERV.UGA.EDU] On Behalf Of xlr82sas > > > Sent: Wednesday, February 24, 2010 8:48 PM > > > To: SA...(a)LISTSERV.UGA.EDU > > > Subject: Re: Drop down to SCL and R in your datastep > > > > On Feb 23, 7:27 pm, xlr82sas <xlr82...(a)aol.com> wrote: > > > > Hi SAS-Lers, > > > > > Clark An posed this problem > > > > > data mat; > > > > do i=1 to 10; > > > > do j=1 to 15; > > > > do k=1 to 100; > > > > do l=1 to 20; > > > > do m=1 to 17; > > > > do n=1 to 23; > > > > X&i&j&k&l&m&n=&i+&j+&k+&l+&m+&n; > > > > output; > > > > end; > > > > end; > > > > end; > > > > end; > > > > end; > > > > end; > > > > run; > > > > > ================================ > > > > >http://homepage.mac.com/magdelina/.Public/utl.html > > > > > utl_tipweb.txt > > > > T005260 DROP DOWN TO SCL IN YOUR DATASTEP > > > > > Here is a SCL solution using FCMP and macros on my site. > > > > There are many implications, perhaps this is a more > > > > powerful than the macro language. > > > > > Note there is no flashing command window. This is lights out solution. > > > > No troublesome GUI to deal with. Good error messages in you log from > > > > SCL. > > > > However, this will not work in EG and you can't imbed widgets. > > > > > data mat2345; > > > > array x[2,3,4,5] x1-x120; > > > > do i=1 to 2; > > > > do j=1 to 3; > > > > do k=1 to 4; > > > > do l=1 to 5; > > > > x[i,j,k,l]=i*j*k*l; > > > > output; > > > > end; > > > > end; > > > > end; > > > > end; > > > > run; > > > > > /* this datastep renames x1-x120 to X1111-X2345 */ > > > > /* SCL is a much more powerful language then macro */ > > > > /* Just put your SCL code after pgm= */ > > > > /* SAS 9.2 Windows 2000 */ > > > > data _null_; > > > > length pgm $1024; > > > > /* SCL program to rename variables - no macro */ > > > > pgm=compbl(" > > > > init: > > > > dsid=open('mat2345','v'); > > > > if dsid then do; > > > > varn=0; > > > > do i=1 to 2; > > > > do j=1 to 3; > > > > do k=1 to 4; > > > > do l=1 to 5; > > > > varn=varn+1; > > > > nam=cats('X',put(i,1.),put(j,1.),put(k,1.),put(l,1.)); > > > > xx=cats('X',put(varn,3.)); > > > > rc=modvar(dsid,xx,nam); > > > > end; > > > > end; > > > > end; > > > > end; > > > > end; > > > > rc=close(dsid); > > > > return;"); > > > > call pgmutl(pgm); > > > > call sclxeq; > > > > run; > > > > > # Variable Type Len > > > > > 1 X1111 Num 8 > > > > 2 X1112 Num 8 > > > > 3 X1113 Num 8 > > > > 4 X1114 Num 8 > > > > 5 X1115 Num 8 > > > > 6 X1121 Num 8 > > > > > ============================ > > > > /* IML solution */ > > > > > proc iml; > > > > x=shape({0} ,1,120,0); > > > > n=shape({' '},1,120,'x0000'); > > > > print n; > > > > idx=0; > > > > do i = 1 to 2; > > > > do j = 1 to 3; > > > > do k = 1 to 4; > > > > do l = 1 to 5; > > > > idx=idx+1; > > > > x[1,idx]=1000*i+100*j+10*k+l; > > > > n[1,idx]=cats('x',char(i,1,0), > > > > char(j,1,0),char(k,1,0),char(l,1,0)); > > > > end; > > > > end; > > > > end; > > > > end; > > > > create mat2345 from x[colname=n]; > > > > append from x; > > > > close mat2345; > > > > quit; > > > > run; > > > > > proc contents; > > > > run; > > > > > Alphabetic List of Variables and Attributes > > > > > # Variable Type Len > > > > > 1 X1111 Num 8 > > > > 2 X1112 Num 8 > > > > 3 X1113 Num 8 > > > > > =================================== > > > > Here is the R solution > > > > > data _null_; > > > > length pgm $1024; > > > > /* R CODE */ > > > > pgm=compbl(" > > > > library(SASxport); > > > > library(foreign); > > > > vv<-list(); > > > > vr="s0000"; > > > > vv<-list(); > > > > vv[vr]<-0; > > > > mat2345=vv; > > > > for (i in 1:2) {; > > > > for (j in 1:3) {; > > > > for (k in 1:4) {; > > > > for (l in 1:5) {; > > > > vr=paste('x',as.character(i),as.character(j), > > > > as.character(k),as.character(l),sep=''); > > > > vv[[vr]]<-i+j; > > > > may2345=data.frame(mat2345,vv); > > > > }; > > > > }; > > > > }; > > > > }; > > > > beg; > > > > write.xport(mat2345,file='C:\\utl\ > > > > \mat2345.xpt',autogen.formats=FALSE);" > > > > ); > > > > call rxeq(pgm); > > > > call getxpt('mat2345'); /* get the detail data from R */ > > > > run; > > > > > proc contents data=mat2345; > > > > run; > > > > > Alphabetic List of Variables and Attributes > > > > > # Variable Type Len > > > > > 1 X1111 Num 8 > > > > 2 X1112 Num 8 > > > > 3 X1113 Num 8 > > > > 4 X1114 Num 8 > > > > 5 X1115 Num 8 > > > > 6 X1121 Num 8 > > > > 7 X1122 Num 8 > > > > > ========================================== > > > > > Future projects drop down to perl and a Java interface to R. > > > > Hi SAS-Lers, > > > > I may have been wrong when I said 'DROP DOWN TO SCL' will not work > > > in EG, however I don't know how one could do it properly without at > > > least starting one SCL GUI interface. My sleazy method of creating an > > > scl catalog from a binary file required me to do the GUI thing at > > > least once. I think you would need to go into the GUI on the server at > > > least once, and I don't see how this is possible in EG. > > > > SCL experts please correct me if I am wrong? > > > > I would be very interested in bootstrap method to create an initial > > > SCL catalog and SCL program without the GUI. No cheating, you cannot > > > copy a catalog from some other location or flash a command window. You > > > application has to work batch lights out on the server and client. The > > > GUI and flasing command window has prevented me from using SCL in the > > > past. > > > > Interestingly, my method may open up possibilites for EG and SCL. We > > > just need a set of catlogs or different environments.- Hide quoted text - > > > > - Show quoted text - > > > Just some quick answers > > > Randy, > > > Thanks for bringing up some critical details for discussion. > > > Was the existing SCL entry created using the GUI? If that is the case > > then EG could not have been used to create the initial SCL program. I > > used SCL entry and catalog incorrectly. I was thinking of the SCL > > entry(program). > > > Clark An > > > I think the lag&n(n) is trivial if you create an array n[*] n1-n120 > > and load the array with whatever you want and set up a second set of > > DOs to access the elements however you want. There would be no symrefs > > in this case. > > > Randy, > > > All the code is on my site, below is the 'prototype' R and SCL > > code. This is not production level code, programmers should add things > > like argument checking and remove ';' restrictions, 1024 byte > > program limit and probaly reduce the number of calls to FCMP. These > > are doable. Basically the code was done as a 'proof of concept'. Here > > are the links to related material. I am busier than a one armed paper > > hanger in a windstorm, so if any body wants to help me clean up the > > code, they are welcome. I want to thank others who have worked offline > > with me to 'correct and improve' my tips over the last few months, you > > know who you are > > > For a cleaner version see: > > >http://homepage.mac.com/magdelina/.Public/utl.html > > utl_tipweb.txt > > > * T005210 DROP DOWN TO R IN A DATASTEP FCMP > > RUN_MACRO > > * T005220 GENERATING VARIABLE NAMES INSIDE THE DATASTEP USING R FCMP > > RUN_MACRO > > * T005260 DROP DOWN TOP SCL IN A DATASTEP FCMP > > RUN_MACRO > > * T005270 USEFUL SCL COMMANDS FOR NON AF BATCH > > PROCESSING > > > ==================================================================================================================== > > > Here is all the ugly code > > > /* T005210 DROP DOWN TO R IN A DATASTEP > > The code lets you do general Analysis of Variance and least squares > > without SAS-Stat > > I use the Zelig package in R which seems very powerful ie Mixed and > > Non linear modeling? > > > data null somedata; > > set sashelp.class; > > output somedata; > > run; > > > data results; > > set null somedata open=defer; * IF YOU DO THIS BE CAREFUL OF > > LOOPING ; > > * do some sas processing on somedata; > > ...... SAS code > > - Hide quoted text - > > - Show quoted text -... > > read more »
From: Randy Herbison on 25 Feb 2010 16:55 " There are SCL commands that will create and compile new SCL entries." Yes, within the Display Manager such commands exist. The context here is EG. -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of montura Sent: Thursday, February 25, 2010 12:38 PM To: SAS-L(a)LISTSERV.UGA.EDU Subject: Re: Drop down to SCL and R in your datastep There are SCL commands that will create and compile new SCL entries. However, the need for that kind of code generation is probably far beyond the very basic needs here. Generating SCL code from within a data step is a sign the programmer is hacking and fumbling for quick and dirty answers. That example of R source code can be coded in SCL objects, without the need for R at all. The only SCL code that requires a GUI are widgets and other SAS/Frame related functions. All other SCL code runs on the backend server, hands off.
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: Problem with the "contents" option in tagsets.excelxp Next: PROC EXPORT in SAS/Server |