Using the Score Code Export Node

Using the Score Code Export Node in a Process Flow Diagram

The Score Code Export node icon is located on the Utility tab, as shown in Figure 3.1:
The Diagram Toolbar with the SAS Score Code Export Node Icon Highlighted
SAS Score Code Export Node on Toolbar
To use the Score Code Export node, you need a process flow diagram that contains nodes that produce score code and that flow to a Score node. The Score node aggregates the score code for the entire analysis path. The Score node must precede the Score Code Export node in the process flow diagram.
Figure 3.2 shows a valid data mining process for exporting score code:
Data Mining Process Flow Diagram
Data Mining Process Flow Diagram
Requirement: The Score Code Export node exports score code that contains only one DATA step. For a list of SAS Enterprise Miner nodes that produce score code, see SAS Enterprise Miner Tools Production of Score Code.
After the process flow diagram is in place, set the properties for the Score node and the Score Code Export node:
  1. Select the Score node. Ensure that the following properties are set to their default value of Yes:
    • Use Output Fixed Names
    • C Score
  2. Select the Score Code Export node and set the properties. The Output Directory property specifies the directory to store the export files. The Name property specifies the folder that contains the output files created by the Score Code Export node. For information about the properties, see Score Code Export Node Properties.
After the properties are set, you are ready to export the score code. Right-click the Score Code Export node and select Run. When SAS Enterprise Miner completes processing, the Run Status window opens to indicate that the run completed. Click the Results button to view the output variables and the listing output. For information about the output, see Output Created by the Score Code Export Node.

Score Code Export Node Properties

When the Score Code Export node is selected in the diagram workspace, the Properties panel displays all of the properties that the node uses and their associated values, as shown in Figure 3.3.
Properties Panel
Properties Panel
The following Train properties are associated with the Score Code Export node:
  • Rerun – Use this property to force the node to run again. This property is useful if the macro variable controlling the target directory and folder name has changed.
  • Output Directory – Enter a fully qualified name for the location of an output directory to contain the score code files. If no directory is entered, a default directory named Score is created in the SAS Enterprise Miner project directory. You can change the value of the default directory by setting the &EM_SCOREDIR=directory macro variable in the SAS Enterprise Miner project start-up code or server start-up code.
  • Name – Enter the name of the model that you are creating. The name is used to create a new subdirectory in the output directory that contains the exported score files. If no name is entered, a default name is generated as a combination of the &SYSUSERID automatic macro variable and an incremental index (for example, userID, userID_2, userID_3).
    You can replace the &SYSUSERID automatic macro variable with a custom name by setting the &EM_SCOREFOLDER=score-folder-name macro variable in the SAS Enterprise Miner project start-up code or server start-up code. An incremental index preceded by an underscore is added to score-folder-name.
The General and Status properties for the Score Code Export node function just as they do for other nodes.