LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2010, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 25 Feb 2010 10:04:46 -0800
Reply-To:     xlr82sas <xlr82sas@AOL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         xlr82sas <xlr82sas@AOL.COM>
Organization: http://groups.google.com
Subject:      Re: Drop down to SCL and R in your datastep
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=UTF-8

On Feb 25, 8:28 am, RandyHerbi...@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...@LISTSERV.UGA.EDU] On Behalf Of xlr82sas > Sent: Wednesday, February 24, 2010 8:48 PM > To: SA...@LISTSERV.UGA.EDU > Subject: Re: Drop down to SCL and R in your datastep > > On Feb 23, 7:27 pm, xlr82sas <xlr82...@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_; call putxpt('regress'); /* create xport dataset for R */ /* R CODE FOR ANALYSIS OF VARIANCE */ pgm=compbl(" library(SASxport); library(foreign); library(Zelig); cls<-read.xport('C:\\utl\\regress.xpt'); z.o1 <- zelig(AGE ~ SEX + WEIGHT + HEIGHT, model = ""aov"", data = cls); coefs<-z.o1$coefficients; coef=data.frame(names(coefs),coefs); write.xport(coef,file='C:\\utl\ \coef.xpt',autogen.formats=FALSE);"); /* EXECUTE R CODE */ call rxeq(pgm); call getxpt('coef'); /* Convert V5 export dataset COEF from R to SAS dataset */ run;

proc print data=coef noobs;run; /* Independent Variable Coefficients(COEF) :: Model=AGE = SEX + WEIGHT + HEIGHT

NAMES_CO COEFS

(Intercept) 0.01339 SEXM -0.80569 WEIGHT 0.01867 HEIGHT 0.19025 */

limitations =========== 1. Communications with R are via a pipe (I pipe R statements into R.exe) ( 2 2. Results to and from R are V5 transport datasets (8 char names and 200 byte char values - this is lossless ) 3. You have to call fcmp to 'put' and 'get' xpt datasets (SAS I need a silent ODBC to eliminate this - like UODBC you removed) 4. I use multiple macro variables for the R code due to a 262 byte limit in run_marco (I allow for 1000 byte R programs) 5. Semicolns must end each R statement and cannot be used anywhere else 6. Program expects the PWD - working directory to be C:\\utl - Cap C and \\ are needed for R(you can change this) 7. SAS 9.2 8. You need 2.7 or later R. install.packages(Zelig), SASxport and foreign 9. Probaly should not iterate the complib setting

/* SAMPLE OUTPUT USING ZELIG PACKAGE IN R (PACKAGE HAS MANY MODDELS INCLUDING MIXED) These are all double precision IEEE floats */

Analysis of Variance Table(AOVTBL) :: Model=AGE = SEX + WEIGHT + HEIGHT

Obs ROWNAMES DF SUM_SQ MEAN_SQ F_VALUE PR__F_

1 SEX 1 0.1497 0.1497 0.2031 0.65867 2 WEIGHT 1 25.0028 25.0028 33.9212 0.00003 3 HEIGHT 1 3.8965 3.8965 5.2863 0.03628 4 Residuals 15 11.0563 0.7371 . .

Predicted Values and Residuals(RESIDUAL) :: Model=AGE = SEX + WEIGHT + HEIGHT

Obs NAME SEX AGE HEIGHT WEIGHT RESID FIT

1 Alfred M 14 69.0 112.5 -0.43462 14.4346 2 Alice F 13 56.5 84.0 0.66974 12.3303 3 Barbara F 13 65.3 98.0 -1.26575 14.2657 4 Carol F 14 62.8 102.5 0.12588 13.8741 5 Henry M 14 63.5 102.5 0.79839 13.2016 6 James M 12 57.3 83.0 0.34190 11.6581 7 Jane F 12 59.8 84.5 -0.96740 12.9674 8 Janet F 15 62.5 112.5 0.99630 14.0037 9 Jeffrey M 13 62.5 84.0 0.33395 12.6660 10 John M 12 59.0 99.5 -0.28950 12.2895 11 Joyce F 11 51.3 50.5 0.28432 10.7157 12 Judy F 14 64.3 90.0 0.07382 13.9262 13 Louise F 12 56.3 77.0 -0.16155 12.1615 14 Mary F 15 66.5 112.0 0.24464 14.7554 15 Philip M 16 72.0 150.0 0.29468 15.7053 16 Robert M 12 64.8 128.0 -1.92490 13.9249 17 Ronald M 15 67.0 133.0 0.56323 14.4368 18 Thomas M 11 57.5 85.0 -0.73348 11.7335 19 William M 15 66.5 112.0 1.05033 13.9497

Independent Variable Coefficients(COEF) :: Model=AGE = SEX + WEIGHT + HEIGHT

Obs NAMES_CO COF

1 (Intercept) 0.01339 2 SEXM -0.80569 3 WEIGHT 0.01867 4 HEIGHT 0.19025

Least Squares Estimates(LSQ) :: Model=AGE = SEX + WEIGHT + HEIGHT

Obs ROWNAMES ESTIMATE STD__ERR T_VALUE PR___T__

1 (Intercept) 0.01339 3.62616 0.00369 0.99710 2 SEXM -0.80569 0.43752 -1.84149 0.08541 3 WEIGHT 0.01867 0.01940 0.96197 0.35132 4 HEIGHT 0.19025 0.08274 2.29921 0.03628

Predicted Values, Residuals and Residual Sum of Squares(SUMSQ):: Model=AGE = SEX + WEIGHT + HEIGH

Obs NAME SEX AGE HEIGHT WEIGHT RESID FIT SUMSQ

1 Alfred M 14 69.0 112.5 -0.43462 14.4346 0.1889 2 Alice F 13 56.5 84.0 0.66974 12.3303 0.6375 3 Barbara F 13 65.3 98.0 -1.26575 14.2657 2.2396 4 Carol F 14 62.8 102.5 0.12588 13.8741 2.2554 5 Henry M 14 63.5 102.5 0.79839 13.2016 2.8928 6 James M 12 57.3 83.0 0.34190 11.6581 3.0097 7 Jane F 12 59.8 84.5 -0.96740 12.9674 3.9456 8 Janet F 15 62.5 112.5 0.99630 14.0037 4.9382 9 Jeffrey M 13 62.5 84.0 0.33395 12.6660 5.0497 10 John M 12 59.0 99.5 -0.28950 12.2895 5.1336 11 Joyce F 11 51.3 50.5 0.28432 10.7157 5.2144 12 Judy F 14 64.3 90.0 0.07382 13.9262 5.2198 13 Louise F 12 56.3 77.0 -0.16155 12.1615 5.2459 14 Mary F 15 66.5 112.0 0.24464 14.7554 5.3058 15 Philip M 16 72.0 150.0 0.29468 15.7053 5.3926 16 Robert M 12 64.8 128.0 -1.92490 13.9249 9.0979 17 Ronald M 15 67.0 133.0 0.56323 14.4368 9.4151 18 Thomas M 11 57.5 85.0 -0.73348 11.7335 9.9531 19 William M 15 66.5 112.0 1.05033 13.9497 11.0563

*/ */

**** START CODE:

proc datasets library=work kill; run; %symdel cmplib; %let cmplib = %sysfunc(getoption(cmplib)); options cmplib = (work.func); %put &cmplib;

/* CREATE XPORT DATASET FROM SAS DATASET */ %macro wrt; %let out = %sysfunc(dequote(&out)); libname xpt xport "&out..xpt";run;quit; proc copy in=work out=xpt; select &out; run;quit; libname xpt clear;run;quit; %mend wrt;

/* CREATE SAS DATASET FROM XPORT DATASET */ %macro get; %let out = %sysfunc(dequote(&out)); libname xpth xport "&out..xpt"; proc copy in=xpth out=work; run;quit; libname xpth clear;run;quit; %mend get;

/* RUN SAS CODE AND CREATE A DATASET */ %macro rsetp; %let sasp = %sysfunc(dequote(&sasp)); %let sumsq = %sysfunc(dequote(&sumsq)); %let residual = %sysfunc(dequote(&residual)); data sumsq; set residual; &sasp; run; %mend rsetp;

/* RUN R CODE (NEED SEMICOLONS) */ %macro runr; data _null_; length pgmx cnd $32755; file 'r_pgm' lrecl=32755 recfm=v; pgmx=cats(&pgm1,&pgm2,&pgm3,&pgm4); semi=countc(pgmx,';'); do idx=1 to semi; cmd=cats(scan(pgmx,idx,';')); put cmd; putlog cmd; end; run; filename rut pipe "C:\Progra~1\R\R-2.9.1\bin\Rterm.exe --no-restore --no-save < r_pgm"; data _null_; file print; infile rut; input; _infile_=strip(_infile_); put _infile_; putlog _infile_; run; %mend runr;

/* FCMP ROUTINES WHOSE ONLY PURPOSE IS TO CALL MACROS */ proc fcmp outlib=work.func.test; subroutine putxpt(out $); rc = run_macro('wrt', out); return; endsub; run; proc fcmp outlib=work.func.test; subroutine getxpt(out $); rc = run_macro('get', out); put out=; return; endsub; run; proc fcmp outlib=work.func.test; subroutine rset(sumsq $,residual $,sasp $); rc=run_macro('rsetp',sumsq, residual, sasp); return; endsub; run; proc fcmp outlib=work.func.test; subroutine rxeq(pgm $); length pgm1 pgm2 pgm3 pgm4 $250; pgm1=substr(pgm,1,250); pgm2=substr(pgm,251,250); pgm3=substr(pgm,501,250); pgm4=substr(pgm,751); put pgm= / pgm1= / pgm2= / pgm3= / pgm4=; rc = run_macro('runr', pgm1, pgm2, pgm3, pgm4); return; endsub; run;

%sysfunc(ifc(%symexist(pgm),%nrstr(%symdel pgm;),%nrstr(%put Does not exist;))); %sysfunc(ifc(%symexist(out),%nrstr(%symdel out;),%nrstr(%put Does not exist;)));

%utlfkil(regress.xpt); %utlfkil(aovtbl.xpt); %utlfkil(coef.xpt); %utlfkil(residual.xpt); %utlfkil(lsq.xpt); %utlfkil(r_pgm); %utl_sasdelete(regress); %utl_sasdelete(lsq); %utl_sasdelete(aovtbl); %utl_sasdelete(coef); %utl_sasdelete(residuals);

options validvarname=upcase noquotelenmax; /* need this because R is case sensitive */

/* create some data */ data regress; set sashelp.class; run;

options xsync xwait;run;

data _null_; length pgm $1024; call putxpt('regress'); /* CREATE AN XPT DATASET FROM REGRESS C:\utl\ */

/* R CODE */ pgm=compbl(" library(SASxport); library(foreign); library(Zelig);

cls<-read.xport('C:\\utl\\regress.xpt'); z.o1 <- zelig(AGE ~ SEX + WEIGHT + HEIGHT, model = ""aov"", data = cls);

cof<-z.o1$coefficients; coef=data.frame(names(cof),cof); write.xport(coef,file='C:\\utl\ \coef.xpt',autogen.formats=FALSE);

resid<-z.o1$residuals; fit<-z.o1$fitted.values; residual<-cbind(cls,resid,fit); write.xport(residual,file='C:\\utl\ \residual.xpt',autogen.formats=FALSE);

z.o2<-summary(z.o1); zmat<-data.frame(unclass(z.o2)); aovtbl<-data.frame(rownames(zmat),zmat);coef; write.xport(aovtbl,file='C:\\utl\ \aovtbl.xpt',autogen.formats=FALSE);

z.o3 <- zelig(AGE ~ SEX + WEIGHT + HEIGHT, model = ""ls"", data = cls); z.o4<-summary(z.o3); ls=z.o4$coefficients; lsq=data.frame(rownames(ls),ls); write.xport(lsq,file='C:\\utl\\lsq.xpt',autogen.formats=FALSE);" );

/* EXECUTE R CODE */ call rxeq(pgm);

/* CONVERT THE XPORT DATASETS FROM R TO SAS DATASETS */ call getxpt('residual'); /* get the detail data from R */ call getxpt('coef'); call getxpt('aovtbl'); call getxpt('lsq'); /* least squares estimates */

/* SAS CODE USING DETAIL RESULTS FROM R AS INPUTS*/ sasp=compbl(" * data sumsq; /* create this dataset */ * set detail; /* dataset from R */ sumsq+(resid**2); put name @20 sumsq; * run;"); /* EXECUTE THE SAS CODE -CREATE DATASET SUMSQ USING DETAIL FROM R*/ call rset('sumsq','residual',sasp); /* create a dataset sumsq = sum(resid^2) */ run;

/* ANALYSIS OF VARIANCE RESULTS */ title "Analysis of Variance Table(AOVTBL) :: Model=AGE = SEX + WEIGHT + HEIGHT"; proc print data=aovtbl width=min;run;

title "Predicted Values and Residuals(RESIDUAL) :: Model=AGE = SEX + WEIGHT + HEIGHT"; proc print data=residual width=min;run;

title "Independent Variable Coefficients(COEF) :: Model=AGE = SEX + WEIGHT + HEIGHT"; proc print data=coef width=min;run;

title "Least Squares Estimates(LSQ) :: Model=AGE = SEX + WEIGHT + HEIGHT"; proc print data=lsq width=min;run;

title "Predicted Values, Residuals and Residual Sum of Squares(SUMSQ):: Model=AGE = SEX + WEIGHT + HEIGHT"; proc print data=sumsq width=min;run;

/* T005220 GENERATING VARIABLE NAMES INSIDE THE DATASTEP USING R

How do I do the following in SAS 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;

/* HERE IS A SOLUTION USING FROP DOWN TO R data _null_; length pgm $1024; /* R CODE */ pgm=compbl(" library(SASxport); library(foreign); vv<-list(); 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*1000+j*100+k*10+l; }; }; }; }; mat2345=data.frame(vv); 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;

/* T005230 USING SQL FEEDBACK AND VALIDATE TO UNDERSTAND TABLE RELATIOSHIPS

Proc sql feedback; validate select * from SASHELP.buy natural full join SASHELP.citiday ; quit;

20352 Proc sql feedback; 20353 validate 20354 select * from SASHELP.buy 20355 natural full join 20356 SASHELP.citiday 20357 ;

NOTE: Statement transforms to: validate select COALESCE(CITIDAY.DATE, BUY.DATE) as DATE, CITIDAY.SNYDJCM, CITIDAY.SNYSECM, CITIDAY.DSIUSWIL, CITIDAY.DFXWCAN, CITIDAY.DFXWUK90, CITIDAY.DSIUKAS, CITIDAY.DSIJPND, CITIDAY.DCP07, CITIDAY.DCD1M, CITIDAY.DTBD3M, BUY.AMOUNT from SASHELP.BUY full outer join SASHELP.CITIDAY on CITIDAY.DATE = BUY.DATE ;quit;

/* T005260 DROP DOWN TOP SCL IN A DATASTEP FCMP RUN_MACRO %let pgm=utl_mkescl; proc datasets kill;run; %macro utlpgm; %let pgm=&pgm; proc sql; create table __bin (bin char(100)); insert into __bin

values('000000000000000000000000C2EA8163B31411CFBD92080009C7318C181F1011222200322201023204000000000000000000')

values('0301181F1011222200322201023204320122220000000010030100000000000000005341532046494C454D414B4520202020')

values('2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020')

values('202020202020434154414C4F4720B4C83E73D254D7416DE72B8ED254D74100000000009CD8C000000000009CD8C000040000')

values('00100000040000000000000000000000392E303130314D3357494E5F50524F00000000000000000000000000000000000000')

values('0000000000000000000000000000000000000000000000000000000000000000000000000000B4C83E73F8865116F8865116')

values('F8865116000000000000000000000000000000005F9CE94E00000000B4C83E73D254D7410000000000000000000000000000')

values('XXXXXXXXXXXXX' )

values('0000000000000000000000000000000000000000000000005E9CE94E0000000000000000010000000010030002007C0F0000')

values('0000202020202020202020202020000000000000000000000000000000000000000000000000000000000000000000000000')

values('XXX' )

values('00000000000000000000000000000000000000000000000000000000000000C02305002F000000000000304B420020202020')

values('2020202020202020202020202020202020202020000000000000000000000000000000000000000000000000000000000000')

values('XXX' )

values('00000000000000000000000000000000000000000000000000000000000000000000000000C02305002E0000000000004B42')

values('20283920436F6C732058203020526F7773292020202020202020000000000000000000000000000000000000000000000000')

values('XXX' )

values('00000000000000000000000000000000000000000000000000000000000000000000000000000000000000C02305002D0000')

values('000000004D420020202020202020202020202020202020202020202020202020000000000000000000000000000000000000')

values('XXX' )

values('00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0')

values('2305002C000000000000304B422028313920436F6C7320582032313120526F77732920202020000000000000000000000000')

values('XXXX' )

values('0000000000C02305002B000000000000304B4200202020202020202020202020202020202020202020202020000000000000')

values('XXXX' )

values('0000000000000000000000C02305002A0000000000004D420020202020202020202020202020202020202020202020202020')

values('XXXX' )

values('0000000000000000000000000000000000C0230500290000000000004B422028313020436F6C73205820353620526F777329')

values('2020202020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')

values('XXX' )

values('0000000000000000000000000000000000000000000000C023050028000000000000304B4200202020202020202020202020')

values('2020202020202020202020200000000000000000000000000000000000000000000000000000000000000000000000000000')

values('XXX' )

values('0000000000000000000000000000000000000000000000000000000000C023050027000000000000304B4200202020202020')

values('2020202020202020202020202020202020200000000000000000000000000000000000000000000000000000000000000000')

values('XXX' )

values('0000000000000000000000000000000000000000000000000000000000000000000000C0230500260000000000004B422028')

values('3520436F6C732058203131303920526F77732920202020200000000000000000000000000000000000000000000000000000')

values('XXX' )

values('0000000000000000000000000000000000000000000000000000000000000000000000000000000000C02305002500000000')

values('00004B4220283420436F6C732058203420526F77732920202020202020200000000000000000000000000000000000000000')

values('XXX' )

values('0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C02305')

values('00240000000000004220283420436F6C732058203420526F7773292020202020202020200000000000000000000000000000')

values('XXXX' )

values('000000C0230500230000000000004220283420436F6C732058203520526F7773292020202020202020200000000000000000')

values('XXXX' )

values('000000000000000000C0230500220000000000004220283420436F6C732058203420526F7773292020202020202020200000')

values('XXXX' )

values('000000000000000000000000000000C0230500210000000000004220283420436F6C732058203320526F7773292020202020')

values('2020202000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')

values('X' )

values('00000000000000000000000000000000535953524553522050474249544D4150000000000000000000000000000000000000')

values('00000000000002000000580310080000000053434C202020202050524F4752414D0000000000000000000000000000000000')

values('0000000000000000020000002C040007000000005D9CE94E000000001001000042202834584C434800000000000000000000')

values('XXXXX' )

values('000000000B050000000000000010000004000000F50A00000100000002000000000500000000000000000000010000000000')

values('2800010000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000')

values('XXXXXXXXX' )

values('0000000000000000000000000000000000000000000000000000584C53520300000010000000B4C83E73D254D741BE9FE274')

values('D254D74114000000010000000001000000010000001000000000202020202020202020202020202020202020000000000300')

values('0000100000000000000000000000000000000000000000000000000000000000000000000000202020202020202001000000')

values('0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')

values('0000000000000000000000000000000000000000000000000000000000000000000000000000584C53520400000010000000')

values('96432B8ED254D74196432B8ED254D74101000000190000003917000010010000001000000010202020202020202020202020')

values('2020202020200000000004000000100000000000000000000000000000000000000000000000000000002000000000000046')

values('2020202020202020010000000100000000000000000000000000000000000000000000000000000000000000000000000000')

values('00000000000000000B007465787420746F2073636C0000000000000000000000000000000000000000000000000000000000')

values('00C02305001B0000000000004B422028313320436F6C732058203420526F7773292020202020202000000000000000000000')

values('XXXX' )

values('00000000000000C02305001A0000000000004B422028313320436F6C732058203820526F7773292020202020202000000000')

values('XXXX' )

values('00000000000000000000000000C0230500190000000000004B422028313320436F6C732058203120526F7773292020202020')

values('2020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')

values('XXX' )

values('00000000000000000000000000000000000000C0230500180000000000004B422028313320436F6C73205820313020526F77')

values('7329202020202020000000000000000000000000000000000000000000000000000000000000000000000000000000000000')

values('XXX' )

values('00000000000000000000000000000000000000000000000000C0230500170000000000004B422028313220436F6C73205820')

values('3220526F77732920202020202020000000000000000000000000000000000000000000000000000000000000000000000000')

values('XXX' )

values('00000000000000000000000000000000000000000000000000000000000000C023050016000000000000304B420020202020')

values('2020202020202020202020202020202020202020000000000000000000000000000000000000000000000000000000000000')

values('XXX' )

values('00000000000000000000000000000000000000000000000000000000000000000000000000C0230500150000000000004B42')

values('2028313020436F6C73205820353220526F777329202020202020000000000000000000000000000000000000000000000000')

values('XXX' )

values('00000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0230500140000')

values('00000000304B4200202020202020202020202020202020202020202020202020000000000000000000000000000000000000')

values('XXX' )

values('00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0')

values('23050013000000000000304B4200202020202020202020202020202020202020202020202020000000000000000000000000')

values('XXXX' )

values('0000000000C023050012000000000000304B4200202020202020202020202020202020202020202020202020000000000000')

values('XXXX' )

values('0000000000000000000000C0230500110000000000004B422028313020436F6C732058203520526F77732920202020202020')

values('XXXX' )

values('000000000000000000000000000000005C9CE94E0000000000000000010000000000000000000601030000001000F00F6A00')

values('0001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')

values('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' )

values('0000000000000000000000005B9CE94E000000000000000001000000000000000000CB04040000001000FB04CC0030000100')

values('FEFF0000010000000200000003000000160000000100000003000000000000000000000000000000FFFFFF7FFFFFFF7F0201')

values('230000001F0001010100CC00230000008C07005F53434C44315F4C010003F38249B917F082010049F2840200500131020116')

values('000000160001000100CC00160002000752454C454153450745584553495A4505464C4147530201800000003C000101010036')

values('0080000200F08005F38848414C4648414C460DF18F0F00FFFF0F00FFFF0F00FFFF0200FFFFF2970F00FFFF0F00FFFF372031')

values('30203133203136203139203232602F0201100100000D000101010010001001020084696E69743A60725027403EF002011001')

values('0000160001010100100010010200E0886C656E677468205263E981383B605F5027403EF00201100100001F00010101001000')

values('10010200E08D6C656E6774682074686546696C65E08524203230303B605F5027403EF00201100100001F0001010100100010')

values('010200E0956C656E67746820746865456E7472792024203132383B605F5027403EF002011001000007000101010010001001')

values('020060775027403EF0020110010000350001010100100010010200E09974686546696C653D73796D67657428275352434649')

values('4C4527293BE18F2A20536F757263652066696C65202A3B60485027403EF00201100100003C0001010100100010010200E0B2')

values('746865456E7472793D73796D6765742827445354454E54525927293B202A2044657374696E6174696F6E20656E747279202A')

values('3B60425027403EF002011001000007000101010010001001020060775027403EF00201100100001D00010101001000100102')

values('00E0932A2041737369676E2066696C656E616D65202A3B60615027403EF0020110010000250001010100100010010200E09B')

values('52633D66696C656E616D65282774656D70272C74686546696C65293B60595027403EF0020110010000070001010100100010')

values('01020060775027403EF0020110010000370001010100100010010200E0AD2A20496E636C7564652065787465726E616C2066')

values('696C6520696E746F207072657669657720627566666572202A3B60475027403EF00201100100002600010101001000100102')

values('00E09C52633D505245564945572827494E434C554445272C2774656D7027293B60585027403EF00201100100003A00010101')

values('00100010010200E0B02A205361766520636F6E74656E7473206F6620707265766965772062756666657220746F2053434C20')

values('656E747279202A3B60445027403EF0020110010000250001010100100010010200E09B52633D505245564945572827534156')

values('45272C746865456E747279293B60595027403EF00201100100001D0001010100100010010200E09352633D50524556494557')

values('2827434C45415227293B60615027403EF00201100100001D0001010100100010010200E09352633D50524556494557282743')

values('4C4F534527293B60615027403EF002011001000007000101010010001001020060775027403EF00201100100001F00010101')

values('00100010010200E0952A20446561737369676E2066696C656E616D65202A3B605F5027403EF0020110010000200001010100')

values('100010010200E09652633D66696C656E616D65282774656D70272C2727293B605E5027403EF00201100100000F0001010100')

values('1000100102008672657475726E3B60705027403EF00000000000000000000000000000000000000000000000000000000000')

values('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' )

values('0000000000000000' ); ;quit;

%let wrkpth=%sysfunc(pathname(work)); data _null_;newdir=dcreate('runscl',"&wrkpth");put newdir=;run; filename _catout "&wrkpth\runscl\pgm2scl.sas7bcat" recfm=f lrecl=50; data _null_; retain byt50; length byt50 $100.; set __bin; if _n_=1 then byt50=repeat('00'x,50); file _catout; if substr(bin,1,1)='X' then do; do idx=1 to lengthn(strip(bin)); put byt50 $char50.; end; end; else do; byt50=input(bin,$hex100.); put byt50 $char50.; end; run;

/* contents cat.pgm2scl */ libname _cat "&wrkpth\runscl\"; proc catalog cat=_cat.pgm2scl; contents; run;quit;

/* # Name Type Create Date Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’Æ’ 1 PROGRAM SCL 13AUG2009:09:15:42 */

/* compile program */ proc build catalog=_cat.pgm2scl batch; compile select=program et=scl; run;

/* NOTE: Compiling PROGRAM.SCL. NOTE: Code generated for PROGRAM.SCL. Code size=1044 NOTE: PROCEDURE BUILD used (Total process time): real time 3.07 seconds cpu time 0.09 seconds */

/* create the scl program you wish to run */ data _null_; length pgmscl pgmx $1024; file "&wrkpth\runscl\procrun.scl"; pgmx=cats(&pgm1,&pgm2,&pgm3,&pgm4); put pgmx ; putlog pgmx; run;

%mend utlpgm;

%macro xeqscl;

/***************************************************************/ /* */ /* copy the scl program to the scl catalog */ /* */ /* Call the program to scl code like this */ /* %let srcFile=c:\runscl\procrun.scl; */ /* %let dstEntry=work.tmp.copy.scl; */ /* proc display catalog=cat.prg2scl.program.scl; */ /* run; */ /* */ /***************************************************************/

%let wrkpth=%sysfunc(pathname(work)); libname _cat "&wrkpth\runscl\"; %let srcFile=&wrkpth\runscl\procrun.scl; %let dstEntry=work.tmp.copy.scl;

proc display catalog=_cat.pgm2scl.program.scl; run;quit;

/* demostrate running proc sql inside a datastep */ data class; set sashelp.class; x=_n_; run;

/* compile scl program */ proc build catalog=work.tmp batch; compile select=copy et=scl; run;quit;

proc catalog cat=work.tmp; contents; run;quit;

Proc Display c=work.tmp.copy.scl ; run ;quit;

%mend xeqscl;

%let cmplib = %sysfunc(getoption(cmplib)); options cmplib = (&cmplib work.func) noquotelenmax;

proc fcmp outlib=work.func.test; subroutine pgmutl(pgm $); length pgm1 pgm2 pgm3 pgm4 $250; pgm1=substr(pgm,1,250); pgm2=substr(pgm,251,250); pgm3=substr(pgm,501,250); pgm4=substr(pgm,751); put pgm= / pgm1= / pgm2= / pgm3= / pgm4=; rc = run_macro('utlpgm', pgm1, pgm2, pgm3, pgm4); return; endsub; run;

proc fcmp outlib=work.func.test; subroutine sclxeq(); rc = run_macro('xeqscl'); return; endsub; run;

*** END FCMP AND MACROS ****;

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;

data _null_; length pgm $1024; /* SCL program to rename variables - nomacro */ 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;

proc contents data=mat2345 position; run;

/* T005270 USEFUL SCL COMMANDS FOR NON AF BATCH PROCESSING libname scl "f:\tip\sclele.xls"; data scl; retain group ' '; set scl.scl; if array ne '' then do; group=array; put "================================================================================================================"; end; else do; group=substr(group,1,17); sorts_an_array=substr(sorts_an_array,1,96); asort=compress(asort,','); asort=prxchange('s/ and/ /',99,asort); if group='List' then put @1 group @7 asort @50 sorts_an_array; else put @1 group @ 20 asort @50 sorts_an_array; end; run; libname scl clear;

=============================================================================================================== Array COMPAREARRAY Allows you to compare two arrays for size and data equality Array COPYARRAY Allows you to copy data from one array into another array Array DELARRAY Deletes a dynamic array Array MAKEARRAY Creates an array of the given size with all elements in the array initialized to missing for num Array REDIM Resizes a dynamic array =============================================================================================================== Catalog CATNAME Defines a concatenated catalog, which contains a logical combination of the entries in two or mo Catalog CEXIST Verifies the existence of a SAS catalog or SAS catalog entry Catalog CONTENTS Displays the attributes of a SAS Table Catalog IMPORT Defines a search path for references to CLASS entries Catalog SEARCH Creates or manipulates the current catalog search path Catalog SEARCHPATH Reports the complete pathname of a SAS catalog entry =============================================================================================================== Character LEFT Returns a left- aligned character string Character LENGTH Returns the length of a trimmed character string Character MLENGTH Returns the maximum length of a variable Character RIGHT Returns a right- aligned character value =============================================================================================================== Command EXECCMDI Executes one or more global commands immediately before processing the next statement, or execut Command LASTCMD Returns the text of the last command that was issued from the application window Command LOOKUPC Searches for a string among a list of valid tokens Command NEXTCMD Discards the current command on the command line Command NEXTWORD Deletes the current word and advances to the next word in the current command Command SYSTEM Issues a host system command Command WORD Returns a word from a command that was issued with the command line, function keys, command proc Command WORDTYPE Identifies the word type of a word on the command line =============================================================================================================== Control Flow CONTINUE Stops processing the current DO loop and resumes with the next iteration of that DO loop Control Flow CONTROL Controls the execution of labeled program sections and the formatting of submit blocks Control Flow DO Designates a group of statements to be executed as a unit Control Flow ENDCATCH Ends a CATCH statement block Control Flow GOTO Branches immediately to another entry Control Flow LEAVE Stops processing the current DO group and resumes with the next statement in sequence Control Flow RETURN Stops executing statements in the program section that is currently executing and may return a v Control Flow RUN Stops executing statements in the program section that is currently executing Control Flow SELECT Executes one of several statements or groups of statements Control Flow STOP Stops executing statements in the program section that is currently executing Control Flow THROW Raises an exception Control Flow WAIT Suspends execution of the next program statement =============================================================================================================== Control or Field CLRFLD Clears the value from variables whose values match a specified value Control or Field DISPLAYED Reports whether a control or field is currently visible Control or Field SETFLD Assigns a value to up to ten blank variables =============================================================================================================== Declarative State DECLARE Declares variables and specifies their data types Declarative State LENGTH Declares variables and specifies their length and whether their data type is numeric or characte =============================================================================================================== Directory DINFO Returns information about a directory Directory DNUM Returns the number of members in a directory Directory DOPEN Opens a directory Directory DOPTNAME Returns the name of a directory attribute Directory DOPTNUM Returns the number of information items that are available for a directory Directory DREAD Returns the name of a directory member Directory MOPEN Opens a member file in a directory =============================================================================================================== Extended Table ENDTABLE Stops the processing of the getrow section of a dynamic extended table Extended Table ISSEL Returns the selection number for a specified row of a selection list Extended Table NSELECT Returns the number of rows that have been selected in a selection list Extended Table SELECT Selects a specified row of a selection list Extended Table SELECTED Returns the number of the row that corresponds to a user's choice in a selection list Extended Table SETROW Determines the characteristics of extended tables Extended Table TOPROW Scrolls a row to the top of an extended table Extended Table UNSELECT Deselects a specified row of a selection list =============================================================================================================== External File FAPPEND Appends the current record to the end of an external file External File FCLOSE Closes an external file, a directory, or a directory member External File FCOL Returns the current column position from the File Data Buffer (FDB) External File FDELETE Deletes an external file External File FEXIST Verifies the existence of the external file that is associated with the specified fileref External File FGET Copies data from the File Data Buffer (FDB) External File FILEDIALOG Displays a selection window that lists external files External File FILEEXIST Verifies the existence of an external file, a directory, or a SAS data library by its physical n External File FILENAME Assigns or deassigns a fileref for an external file, a directory, an output device, or a catalog External File FILEREF Verifies that a fileref has been assigned for the current SAS session or process External File FINFO Returns a file information item External File FNOTE Identifies the last record that was read External File FOPEN Opens an external file External File FOPTNAME Returns the name of an item of information for a file External File FOPTNUM Returns the number of information items that are available for an external file External File FPOINT Positions the "read" pointer on the next record to be read External File FPOS Sets the position of the column pointer in the File Data Buffer External File FPUT Moves data to the File Data Buffer (FDB) for an external file, starting at the FDB's current col External File FREAD Reads a record from an external file into the File Data Buffer (FDB) External File FREWIND Positions the file pointer at the beginning of the file External File FRLEN Returns the size of the last record read, or, if the file is opened for output, returns the curr External File FSEP Sets the token delimiters for the FGET function External File FSLIST Displays an external file for browsing External File FWRITE Writes a record to an external file External File PATHNAME Returns the physical name of a SAS data library or an external file =============================================================================================================== Formatting INFORMAT Verifies that the specified informat is valid Formatting INPUTC INPUTN Read a character value using an informat Formatting PUTC PUTN Return a formatted value, using the specified format =============================================================================================================== Image LNAMECHK Validates a path string Image LNAMEGET Decodes a path string =============================================================================================================== Interface to SAS RSESSION Returns the name, description, and SAS software version of a remote session Interface to SAS RSTITLE Defines a description for an existing connection to a remote session Interface to SAS SASTASK Determines whether a SAS procedure is running =============================================================================================================== Keys FKEYNAME Returns the name of the specified function key Keys GETFKEY Returns the command that is assigned to a function key Keys LASTKEY Returns the number of the last function key that was pressed from the application window Keys NUMFKEYS Returns the number of function keys that are available for the device Keys SETFKEY Assigns a command to a function key =============================================================================================================== List COMPARELIST Compares two SCL lists List COPYLIST Copies or merges the contents of an SCL list into an existing list or a new list List CURLIST Designates or reports the current result SCL list List DELITEM Deletes an item from an SCL list List DELLIST Deletes a list and optionally deletes all of its sublists List DELNITEM Deletes a named item from an SCL list List DESCRIBE Fills an SCL list with items of system information about a SAS table, view, or catalog entry List ENVLIST Returns the list identifier of an SCL environment list List FILLIST Fills an SCL list with text and data List GETITEMC GETITEML GETITEMN GETITEMO Returns a value that is identified by its position in an SCL list List GETLATTR Returns the attributes of either an SCL list or an item in the list List GETNITEMC GETNITEML GETNITEMN GETNITEMO Return a value identified by its item name in an SCL list List HASATTR Reports whether an SCL list or a list item has a specified attribute List INSERTC INSERTL INSERTN INSERTO Insert a value into an SCL list List ITEMTYPE Reports the type of an item in an SCL list List LISTLEN Reports the length of an SCL list List LVARLEVEL Fills an SCL list with the unique values of a column from a SAS table List MAKELIST Creates an SCL list List MAKENLIST Creates an SCL list that contains named items List NAMEDITEM Returns the index of a named item in a list List NAMEITEM Returns and optionally replaces the name of an item in an SCL list List POPC POPL POPN POPO Removes an item from an SCL list and returns the value of the item List POPMENU Displays a pop-up menu that contains character items from an SCL list List PUTLIST Displays the contents of an SCL list in the LOG window List REVLIST Reverses the order of the items in an SCL list List ROTLIST Rotates the items in an SCL list List SAVELIST Stores SCL list items in a SAS catalog entry or in an external file List SEARCHC SEARCHL SEARCHN SEARCHO Search for a value in an SCL list and return its position number List SETITEMC SETITEML SETITEMN SETITEMO Store a value at an indexed position in an SCL list List SETLATTR Sets the attributes of an SCL list or an item in a list List SETNITEMC SETNITEML SETNITEMN SETNITEMO Assign a value to a named item in an SCL list List SORTLIST Sorts the items in an SCL list by value or by name =============================================================================================================== Macro SYMPUT SYMPUTN Store a value in a SAS macro variable =============================================================================================================== Message SYSMSG Returns the text of SCL error messages or warning messages Message SYSRC Returns a system error number or the exit status of the most recently called entry =============================================================================================================== Modular Programmi DISPLAY Runs a catalog entry that was created with SAS/AF software Modular Programmi ENDMETHOD Ends a METHOD statement block Modular Programmi ENTRY Receives parameters from the DISPLAY function or routine Modular Programmi GETPARMID Returns the numeric value stored by the SETPARMID routine Modular Programmi METHOD Executes a method block that is defined in an SCL entry Modular Programmi METHOD Defines a method that can be called by the METHOD routine Modular Programmi NOCHANGE Causes the called program to return the original values for the variables that it received as pa Modular Programmi SETPARMID Makes the value of an SCL numeric variable available between SCL programs =============================================================================================================== Object Oriented CBT Runs a CBT entry Object Oriented CLASS Creates a class using SCL code Object Oriented CREATESCL Writes class or interface information to an SCL entry Object Oriented DIALOG Runs a FRAME entry that was created with SAS/AF software and disables all other windows Object Oriented DISPLAY Runs a catalog entry that was created with SAS/AF software Object Oriented ENDCLASS Ends a CLASS statement block Object Oriented ENDMETHOD Ends a METHOD statement block Object Oriented ENDPACKAGE Ends a PACKAGE statement block Object Oriented ENDUSECLASS Ends a USECLASS statement block Object Oriented ENTRY Receives parameters from the DISPLAY function or routine Object Oriented GETPARMID Returns the numeric value stored by the SETPARMID routine Object Oriented IMPORT Defines a search path for references to CLASS entries Object Oriented INSTANCE Creates an object and returns its identifier Object Oriented INTERFACE Defines a group of abstract methods shared by the related classes Object Oriented ITEM Specifies the classes on the server that can be accessed by applications on the client Object Oriented LOADCLASS Loads a class and returns its identifier number Object Oriented LOADRES Loads a RESOURCE entry Object Oriented METHOD Defines a method that can be called by the METHOD routine Object Oriented METHOD Executes a method block that is defined in an SCL entry Object Oriented _NEO_ Creates an object Object Oriented _NEW_ Creates an object and runs an associated class constructor Object Oriented NOCHANGE Causes the called program to return the original values for the variables that it received as pa Object Oriented NOTIFY Sends a method to a control that is identified by its name Object Oriented PACKAGE Defines a group of classes whose metadata must be recognized by objects defined on the client Object Oriented SEND Sends a method to an object using its identifier and can return a value from a called method Object Oriented SETPARMID Makes the value of an SCL numeric variable available between SCL programs Object Oriented SUPAPPLY Invokes the inherited definition of a method and passes the method's arguments in an SCL list Object Oriented SUPER Invokes the inherited definition of a method Object Oriented USECLASS Implements methods for a class and binds them to the class definition =============================================================================================================== SAS System Option GETFOOT Returns the text of a footnote definition SAS System Option GETTITLE Returns the text of a title definition SAS System Option GGLOBAL Returns the text of a SYMBOL, PATTERN, LEGEND, or AXIS statement SAS System Option GGLOBALE Deletes an internal table of SYMBOL, PATTERN, LEGEND, or AXIS definitions SAS System Option GGLOBALN Returns the number of SYMBOL, PATTERN, LEGEND, or AXIS statements that are currently defined SAS System Option OPTGETC OPTGETN Return the current setting of a SAS system option SAS System Option OPTSETC OPTSETN Assign a value to a SAS system option SAS System Option SETFOOT Sets the text of a footnote definition SAS System Option SETTITLE Sets the text of a title definition =============================================================================================================== SAS Table ATTRC ATTRN Return the value of an attribute for a SAS table SAS Table CLOSE Closes a SAS table SAS Table CONTENTS Displays the attributes of a SAS table SAS Table CUROBS Returns the number of the current row in a SAS table SAS Table DATALISTC DATALISTN Displays a selection list window that contains the values of particular columns from rows in a S SAS Table DELOBS Deletes a row from a SAS table SAS Table DROPNOTE Deletes a note marker from either a SAS table or an external file SAS Table DSID Searches for a SAS table name and returns the table identifier SAS Table DSNAME Returns the SAS table name that is associated with a table identifier SAS Table EXIST Verifies the existence of a member of a SAS data library SAS Table FETCH Reads the next nondeleted row from a SAS table into the Table Data Vector (TDV) SAS Table FETCHOBS Reads a specified row from a SAS table into the Table Data Vector (TDV) SAS Table FSEDIT Displays a SAS table by row SAS Table FSVIEW Displays a SAS table in tabular format SAS Table GETVARC GETVARN Assign the value of a SAS table column to an SCL variable SAS Table GETVARF Assigns the formatted value of a SAS table column to a character SCL variable SAS Table ICCREATE Creates integrity constraints on a SAS table SAS Table ICDELETE Drops an integrity constraint from a SAS table SAS Table ICREATE Creates an index for a SAS table SAS Table ICTYPE Returns the type of integrity constraint that is assigned to a SAS table SAS Table ICVALUE Returns the column names or the condition associated with an integrity constraint SAS Table IDELETE Deletes an index from a SAS table SAS Table IMPORT Creates a SAS table from an external file SAS Table INITROW Initializes the Table Data Vector (TDV) for a SAS table to missing values SAS Table IOPTION Returns options for index columns and key columns SAS Table ISINDEX Returns the type of index for a SAS table column SAS Table IVARLIST Returns the column names for an index key SAS Table KEYCOUNT Returns the number of rows that meet the criteria specified by an index key SAS Table LIBLIST Displays a host selection window that lists the currently assigned librefs, and returns user's s SAS Table LIBNAME Assigns or deassigns a libref for a SAS data library SAS Table LIBREF Verifies that a libref has been assigned SAS Table LOCATEC LOCATEN Search a SAS table for a row that contains a specified value SAS Table LOCK Locks or unlocks a SAS table or a SAS catalog entry SAS Table NEW Defines a new SAS table interactively SAS Table NEWVAR Adds a column to a new SAS table SAS Table NOTE Returns an identifier for the current row of a SAS table SAS Table OBSINFO Returns information about the current row in an FSEDIT application SAS Table OPEN Opens a SAS table SAS Table POINT Locates a row that is identified by the NOTE function SAS Table PUTVARC PUTVARN Write a value to the Table Data Vector (TDV) for a SAS table SAS Table REWIND Positions the table pointer at the beginning of a SAS table SAS Table SET Links SAS table columns to SCL variables of the same name and data type SAS Table SETKEY Defines an index key for retrieving rows from a SAS table SAS Table SORT Sorts a SAS table by one or more columns SAS Table UNLOCK Releases a lock on the current row SAS Table UPDATE Writes values from the Table Data Vector (TDV) to the current row in a SAS table SAS Table VARLIST Displays a dialog window that lists the columns in a SAS table, and returns the user's selection SAS Table WHERE Applies a WHERE clause to a SAS table =============================================================================================================== Selection List COLORLIST Displays a selection list of the names of a device's valid colors and returns user selections Selection List DEVLIST Displays a selection list of graphic hardware devices and returns user selections Selection List DIRLIST Opens a host selection list window that lists members of one or more SAS data libraries, and ret Selection List FILELIST Displays a host selection window that lists the currently assigned filerefs, and returns user se Selection List FONTSEL Opens the selector window for host fonts or for portable fonts Selection List LISTC LISTN Display a selection list window containing values stored in a catalog entry Selection List OPENENTRYDIALOG Displays a dialog window that lists catalog entries, and returns the user's selection Selection List OPENSASFILEDIALOG Displays a dialog window that lists SAS files, and returns the user's selection Selection List SAVEENTRYDIALOG Opens a dialog window that lists catalog entries, and returns the name of the selected entry Selection List SAVESASFILEDIALOG Displays a dialog window that lists SAS files, and returns the name of the selected file Selection List SELECTICON Displays a dialog window that contains a list of icons, and returns the value of the selected ic Selection List SHOWLIST Displays a selection list window that contains up to 13 items, and returns the user's selections =============================================================================================================== Submit Block PREVIEW Manipulates an application's preview buffer Submit Block REPLACE Substitutes a replacement string for a reference to an SCL variable in the SUBMIT block Submit Block SUBMIT Submits statements or commands to SAS for execution Submit Block SUBMITCLEAR Aborts a pending submit transaction =============================================================================================================== Utility BUILD Invokes the BUILD window in SAS/AF software Utility COPY Copies a SAS table, view, catalog, or catalog entry Utility DELETE Deletes a member of a SAS data library or an external file or directory Utility LETTER Displays the FSLETTER window or sends a letter that was created with the FSLETTER procedure Utility LIBREF Verifies that a libref has been assigned Utility MESSAGEBOX Displays a host message window with a specified text and icon Utility NAMEDIVIDE Returns the number of parts of a compound name as well as the values of each part Utility NAMEMERGE Returns a compound name by merging name parts Utility PUT Writes text to the LOG window Utility RENAME Renames a member of a SAS data library, an external file, or a directory Utility RGBDM Returns the name supported by the SAS windowing environment for a color Utility SASNAME Verifies that a name is a valid SAS name Utility TRACEBACK Displays traceback information for an SCL execution stack Utility UNIQUENUM Returns a unique number Utility WAIT Suspends execution of the next program statement =============================================================================================================== Variable VARFMT Returns the format that is assigned to a SAS table column Variable VARINFMT Returns the informat that is assigned to a SAS table column Variable VARLABEL Returns the label that is assigned to a SAS table column Variable VARLEN Returns the length of a SAS table column Variable VARLEVEL Reports the unique values of a SAS table column Variable VARNAME Returns the name of a SAS table column Variable VARNUM Returns the number of a SAS table column Variable VARSTAT Calculates simple statistics for SAS table columns Variable VARTYPE Returns the data type of a SAS table column ===============================================================================================================


Back to: Top of message | Previous page | Main SAS-L page