Running Scoring Models in SPD Server

To run the scoring model in SPD Server, follow these steps:
  1. Create a scoring model using SAS Enterprise Miner.
  2. Start SAS.
  3. 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>;
    For more information, see INDCONN Macro Variable.
  4. 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.
    For more information, see %INDSP_PUBLISH_MODEL Macro Syntax.
  5. 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.
    For more information, see INDCONN Macro Variable and INDDATA Macro Variable.
  6. 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.
    For more information, see %INDSP_RUN_MODEL Macro Syntax.
  7. Submit an SQL query against the output table.
    For more information, see Scoring Output.