To run the scoring model
in SPD Server, follow these steps:
-
Create a scoring model
using SAS Enterprise Miner.
-
-
Submit this command
in the Program Editor or Enhanced Editor to provide SPD Server connection
information to the
%INDSP_PUBLISH_MODEL and the
%INDSP_PUBLISH_MODELmacros.
%let indconn = domain=mydomain server=myserver port=myport
user=myuserid <password=XXXX>;
-
Run the %INDSP_PUBLISH_MODEL macro.
The %INDSP_PUBLISH_MODEL macro publishes the model to the SPD Server. This
model is made available to run using data stored in the SPD Server.
The %INDSP_PUBLISH_MODEL macro uses some of the files that are created by the
SAS Enterprise Miner Score Code Export node: the scoring model program
(score.sas file), the properties file (score.xml file), and (if the
training data includes SAS user-defined formats) a format catalog.
After the model is published,
two SPD Server tables are created in the INDCONN domain: modelname_ARGS
and modelname_PKG. If you have
user-defined formats in the model, an additional table, modelname_FMT,
is created.
-
Submit these commands
in the Program Editor or Enhanced Editor to provide SPD Server connection
information to the
%INDSP_PUBLISH_MODEL and the
%INDSP_PUBLISH_MODEL macros.
%let indconn = domain=mydomain server=myserver port=myport
user=myuserid <password=XXXX>;
%let inddata domain=mydomain server=myserver port=myport
user=myuserid <password=XXXX>;
The INDDATA macro variable
provides the SPD Server connection information for the input and output
tables.
Note: You do not have to resubmit %let
indconn=
if you already submitted the command in your
SAS session to publish the model.
-
Run the %INDSP_RUN_MODEL macro.
The %INDSP_RUN_MODEL macro runs the scoring model. The %INDSP_RUN_MODEL macro uses the tables that were created by the %INDSP_PUBLISH_MODEL macro as well
as table that contains the input data.
The %INDSP_RUN_MODEL macro creates an SPD Server output table by default.
The output table name is modelname_OUT.
When the model is run, another SPD Server table, modelname_THR,
is created in the INDCONN domain.
Note: The %INDSP_PUBLISH_MODEL and the %INDSP_RUN_MODEL must be run from sessions that use the same encoding
or locale.
-
Submit an SQL query
against the output table.