/* Enable DATA step parallel processing using the system option */
/* and enable messages to view non-compliant code in the SAS log. */
options dsaccel=any msglevel=i;
/* Create a libref for in-memory tables. */
libname lasr sasiola host="grid001.example.com" port=10010 tag='hps';
/* Create a libref for the input data that is stored on disk. */
libname score '/myScoreData/';
/* Load the input table into memory */
data lasr.intr;
set score.intrid;
run;
/* Execute the score code using the in-memory tables. */
/* Both tables must use the same libref. */
data lasr.sumnormtable;
set lasr.intr;
/* Execute the score code. */
if sum > 1000
then score=1;
run;
/* Enable DATA step parallel processing using the system option */ /* and enable messages to view non-compliant code in the SAS log. */ options dsaccel=any msglevel=i; /* Create a libref for the in-memory tables. */ libname lasr sasiola host="grid001.example.com" port=10010 tag='hps'; /* Create a libref for the input data and format catalog that is */ /* stored on disk. */ libname score '/myScoreData/'; /* Copy the demx format catalog to the Work library */ proc catalog catalog=score.dmex; copy out=work.formats; quit; /* Enable in-memory processing (dsaccel) and load the input table */ /* into memory. */ data lasr.dmex; set score.dmex; run; /* Enable in-memory processing (dsaccel) and execute the score code .*/ /* using the in-memory tables. */ data lasr.dmexout; set lasr.dmex; %inc "dmex.sas"; run;
options fmtsearch=(myFmtLib);
options fmtsearch=(myFmtLib.myFmts);
libname lasr sasiola; data lasr.out; set lasr.in; /* DATA step code */ run;
DATA Step Statement
|
Alternative
|
---|---|
BY (or FIRST. and LAST.
variables)
|
See the GROUPBY Statement or Using Partitioning and Scoring.
|
CARDS and CARDS4
|
|
CONTINUE
|
|
DISPLAY
|
|
ERROR
|
|
FILE
|
|
Subsetting IF
|
Two options are available.
You can write a program that includes a subsetting IF and use the
SCORE statement. Another option is use to use the BALANCE statement. See the example.
|
INFILE
|
|
INPUT
|
|
LEAVE
|
|
LIST
|
|
LOSTCARD
|
|
MERGE
|
You might
be able to use the SCHEMA Statement to produce similar results.
|
MISSING
|
|
MODIFY
|
|
OUTPUT
|
You can use the
__lasr_output variable
in a program with the SCORE statement to control when to output an
observation. You can write observations to a single output table only.
|
PUT
|
A PUT statement in a
program that is used with the SCORE statement writes entries to a
temporary table instead of to the SAS log. You can view the
results of the PUT statements by specifying the PGMMSG option in
the IMSTAT statement and then viewing the contents of the &_PGMMSG_
temporary table. For an example, see Using the RETAIN Statement.
|
REMOVE
|
|
RENAME
|
|
REPLACE
|
|
RETAIN
|
You can specify the
DSRETAIN option to the SCORE statement and use the RETAIN statement
in your program. See Using the RETAIN Statement.
|
UPDATE
|
You can use the DATA=
option with the UPDATE statement to make changes to a table. However,
this statement updates the active table rather than creating a new
table. See Update with a Data Set.
|
WHERE
|
|
WINDOW
|
do month='JAN','FEB','MAR';
.