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.
    For traditional scoring models, you can 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.
    For analytic store scoring models, you can also use the SAS Factory Miner HPFOREST or HPSVM component to create an analytic score file (score.sasast file) and the scoring model program (score.sas file).
  2. 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.
  3. 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

Arguments

DIR=input-directory-path

specifies the local directory where the scoring model program, the properties XML file, the analytic store file (if analytic store scoring), and the optional format catalog are located.

This is the directory that is created by the SAS Enterprise Miner Score Code Export node or the SAS Factory Miner HPFOREST or HPSVM components. This directory contains the score.sas file, the score.xml file or (if analytic store scoring) score.sasast 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 filenames that are created by SAS Enterprise Miner, you must specify the DATASTEP=, XML=, STORE= (if analytic store scoring) , and FMTCAT= arguments (if needed).
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 or the SAS Factory Miner HPFOREST or HPSVM component.

Default score.sas
Restriction Only DATA step programs that are produced by the SAS Enterprise Miner Score Code Export node or the SAS Factory Miner HPFOREST or HPSVM component can be used.
Interaction If you use the default score.sas file that is created by the SAS Enterprise Miner Score Code Export node or the SAS Factory Miner HPFOREST or HPSVM component, 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. This argument is not applicable for analytic store models generated by SAS Factory Miner.
The maximum number of output variables is 1000.
Interactions 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.
If you specify both the XML= and STORE= arguments, the XML= argument is ignored and a warning is printed to the SAS log. The XML= argument is used for traditional model scoring. The STORE= argument is used for analytic store scoring.
See STORE=analytic-store-filename

STORE=analytic-store-filename

specifies the filename of the analytic store.

Default score.sasast
Restriction Only analytic store files that are produced by the SAS Factory Miner HPFOREST or HPSVM components can be used.
Interactions If an analytic store file exists in the input directory (DIR=), the %INDHN_PUBLISH_MODEL macro attempts to publish that object. Alternatively, you can specify the name of the analytic store in the STORE= argument.
If you specify both the XML= and STORE= arguments, the XML= argument is ignored and a warning is printed to the SAS log. The XML= argument is used for traditional model scoring. The STORE= argument is used to analytic store scoring.
See DIR=input-directory-path
XML=xml-filename

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 or the SAS Factory Miner HPFOREST or HPSVM component can be used.
Interactions If you use the default format catalog that is created by the SAS Enterprise Miner Score Code Export node or the SAS Factory Miner HPFOREST or HPSVM component, 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.
Note The analytic store file includes format catalog information. However, you can specify a different format catalog by using the FMTCAT= argument.

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