Running the %INDOR_PUBLISH_MODEL Macro

%INDOR_PUBLISH_MODEL Run Process

To run the %INDOR_PUBLISH_MODEL macro, complete the following steps:
  1. Create a scoring model using SAS Enterprise Miner.
  2. Use the SAS Enterprise Miner Score Code Export node to create a score output directory.
    This directory contains the score.sas file, the score.xml file, and, if needed, the format catalog.
  3. Start SAS and submit this command in the Program Editor or Enhanced Editor:
    %let indconn = user=myuserid password=XXXX path=ortest;
    For more information, see the INDCONN Macro Variable.
  4. Run the %INDOR_PUBLISH_MODEL macro.
    Messages are written to the SAS log that indicate the success or failure of the creation of the .ds2 and .xml scoring files.
    For more information, see %INDOR_PUBLISH_MODEL Macro Syntax.

INDCONN Macro Variable

The INDCONN macro variable is used to provide credentials to connect to Oracle. You must specify user, password, and database information to access the machine on which Oracle is installed. You must assign the INDCONN macro variable before the %INDOR_PUBLISH_MODEL macro is invoked.
Here is the syntax for the value of the INDCONN macro variable for the %INDOR_PUBLISH_MODEL macro:
USER=user PASSWORD=password PATH=path
Arguments

USER=user

specifies the Oracle user name (also called the user ID) that is used to connect to the database.

PASSWORD=password

specifies the password that is associated with your Oracle user ID.

Tip Use only PASSWORD=, PASS=, or PW= for the password argument. PWD= is not supported and causes an error to occur.

PATH=path

specifies the Oracle driver, node, and database that contains the tables and views that you want to access.

Tip
The INDCONN macro variable is not passed as an argument to the %INDOR_PUBLISH_MODEL macro. This information can be concealed in your SAS job. For example, you can place it in an autoexec file and apply permissions to the file so that others cannot access the user credentials.

%INDOR_PUBLISH_MODEL Macro Syntax

Arguments

DIR=input-directory-path

specifies the directory where the scoring model program, the properties file, and the format catalog are located.

This is the directory that is created by the SAS Enterprise Miner Score Code Export node. This directory contains the score.sas file, the score.xml file, and (if user-defined formats were used) the format catalog.
Restriction You must use a fully qualified pathname.
Interaction If you do not use the default directory that is created by SAS Enterprise Miner, you must specify the DATASTEP=, XML=, and (if needed) FMTCAT= arguments.
See Special Characters in Directory Names

MODELNAME=name

specifies the name for the published model.

Restriction The model filename cannot exceed 128 characters. For more information, see Oracle Scoring Files.

MODELTABLE=model-table-name

specifies the name of the model table where the scoring files are published.

Default sas_model_table
Requirement The name of the model table must be the same as the name specified in the %INDOR_CREATE_MODELTABLE macro. For more information, see the MODELTABLE argument in %INDOR_CREATE_MODELTABLE Macro Syntax.

DATASTEP=score-program-filename

specifies the name of the scoring model program file that was created by using the SAS Enterprise Miner Score Code Export node.

Default score.sas
Restriction Only DATA step programs that are produced by the SAS Enterprise Miner Score Code Export node can be used.
Interaction If you use the default score.sas file that is created by the SAS Enterprise Miner Score Code Export node, you do not need to specify the DATASTEP= argument.

XML=xml-filename

specifies the name of the properties XML file that was created by the SAS Enterprise Miner Score Code Export node.

Default score.xml
Restrictions Only XML files that are produced by the SAS Enterprise Miner Score Code Export node can be used.
The maximum number of output variables is 1000.
Interaction If you use the default score.xml file that is created by the SAS Enterprise Miner Score Code Export node, you do not need to specify the XML= argument.

DATABASE=database-name

specifies the name of an Oracle database to which the scoring files are published.

Default The database specified in the INDCONN macro variable
Requirement The name of the database must be the same as the database specified in the %INDOR_CREATE_MODELTABLE macro. For more information, see the DATABASE argument in %INDOR_CREATE_MODELTABLE Macro Syntax.
Interaction The database that is specified by the DATABASE argument takes precedence over the database that you specify in the INDCONN macro variable. For more information, see %INDOR_PUBLISH_MODEL Run Process.

FMTCAT=format-catalog-filename

specifies the name of the format catalog file that contains all user-defined formats that were created by the FORMAT procedure and that are referenced in the DATA step scoring model program.

Restriction Only format catalog files that are produced by the SAS Enterprise Miner Score Code Export node can be used.
Interactions If you use the default format catalog that is created by the SAS Enterprise Miner Score Code Export node, you do not need to specify the FMTCAT= argument.
If you do not use the default catalog name (FORMATS) or the default library (WORK or LIBRARY) when you create user-defined formats, you must use the FMTSEARCH system option to specify the location of the format catalog. For more information, see PROC FORMAT in the Base SAS Procedures Guide.

ACTION=CREATE | REPLACE | DROP

specifies one of the following actions that the macro performs:

CREATE

creates new files.

REPLACE

overwrites the current files, if files with the same name are already registered.

DROP

causes all files for this model to be dropped from the Oracle database.

Default CREATE
Tip If the model has been previously published and you specify ACTION=CREATE, you receive warning messages from Oracle. If the model has been previously published and you specify ACTION=REPLACE, no warnings are issued.

OUTDIR=diagnostic-output-directory

specifies a directory that contains diagnostic files.

Files that are produced include an event log that contains detailed information about the success or failure of the publishing process and sample SQL code (SampleSQL.txt). For more information about the SampleSQL.txt file, see Oracle Scoring Files.
Tip This argument is useful when testing your scoring models.
See Special Characters in Directory Names