Running the %INDHN_PUBLISH_MODEL Macro

%INDHN_PUBLISH_MODEL Macro Run Process

To run the %INDHN_PUBLISH_MODEL macro, follow these 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. Populate the directory with the score.sas file, the score.xml file, and (if needed) the format catalog.
  3. Start SAS and submit the following command in the Program Editor or Enhanced Editor:
    %let indconn = %str(user='youruserid' password='yourpwd'
        schema=yourschema);
    
    The arguments supplied to the INDCONN macro variable can vary. For more information, see the INDCONN Macro Variable.
  4. Run the %INDHN_PUBLISH_MODEL macro.
    For more information, see %INDHN_PUBLISH_MODEL Macro Syntax.
    Messages are written to the SAS log that indicate the success or failure of the creation of the .ds2 and .xml scoring files.

%INDHN_PUBLISH_MODEL Macro Syntax

%INDHN_PUBLISH_MODEL
( DIR=input-directory-path, MODELNAME=name
<, MODELTABLE=<<">model-schema<".>><">model-table-name<">>
<, DATASTEP=score-program-filename>
<, XML=xml-filename>
<, DATABASE=database-name>
<, FMTCAT=format-catalog-filename>
<, ACTION=CREATE | REPLACE | DROP>
<, OUTDIR=diagnostic-output-directory>
);
Arguments

DIR=input-directory-path

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

This directory 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 name cannot exceed 128 characters.

MODELTABLE=<<">model-schema<">.><">model-table-name<">

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

Default SAS_MODEL_TABLE
Requirements The name of the model table must be the same as the name specified in the %INDHN_CREATE_MODELTABLE macro. For more information, see the MODELTABLE argument in %INDHN_CREATE_MODELTABLE Macro Syntax.
The maximum table name length is 30 characters, and it must be a valid SAP HANA table name.
If the model table name is case sensitive, you must enclose the name in double quotation marks and set the INDCONN macro variable’s PRESERVE_TAB_NAMES argument to YES.
See INDCONN Macro Variable

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 the ODBC data source for the SAP HANA system 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 %INDHN_CREATE_MODELTABLE macro. For more information, see the DATABASE argument in %INDHN_CREATE_MODELTABLE Macro Syntax.
Interaction The database that is specified by the DATABASE argument takes precedence over the server, port, or instance value that you specify in the INDCONN macro variable. For more information, see INDCONN Macro Variable.

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 SAP HANA database.

Default CREATE
Tip If the model has been previously published and you specify ACTION=CREATE, you receive warning messages from SAP HANA. 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.
Tip This argument is useful when testing your scoring models.
See Special Characters in Directory Names