Overview

In order to integrate a node into a process flow, the SAS Enterprise Miner environment generates and initializes a variety of macro variables and variables macros at run time. As a developer, you can take advantage of these macro variables and variables macros to enable your extension node to function effectively and efficiently within an Enterprise Miner process flow.
These tools are documented in the help file for the SAS Code node. For convenience, the SAS Code node's documentation is reproduced in its entirety in Appendix 1: SAS Code Node Documentation.
There is also a collection utility macros that can be invaluable:
  • %EM_REGISTER
  • %EM_REPORT
  • %EM_MODEL
  • %EM_DATA2CODE
  • %EM_DECDATA
  • %EM_ODSLISTON
  • %EM_ODSLISTOFF
  • %EM_METACHANGE
  • %EM_CHECKERROR
  • %EM_PROPERTY
  • %EM_GETNAME
These are documented in the Utility Macros section of the SAS Code node help file. In the discussion that follows, each time a macro is referenced initially, a hyperlink to its documentation is provided rather than providing syntax diagrams within the text. Even so, it is recommended that you read both appendixes before proceeding with this chapter in order to gain an appreciation of the scope of the tools available to you.
There is also another reason why you should read Appendix 1: SAS Code Node Documentation in its entirety. The SAS Code node can be used to develop, test, and modify an extension node's code in the context of a process flow diagram without being encumbered by deployment issues. There are also a number of useful examples in the SAS Code node's documentation that can guide you when writing your own code. However, you should be aware that the Score Code pane of the SAS Code node's Code Editor is reserved for what is known as static scoring code. Dynamic scoring code must be included in the Train code pane of the Code Editor (this is discussed in greater detail in the SAS Code node documentation). Therefore, the way you separate your code into Train, Score, and Report actions in an extension node might not directly correspond to the way you separate your code in the Train, Score, and Report code panes of the SAS Code node Code Editor. Also, you cannot develop and test the node's properties file or the node's Create action using the SAS Code node; you must deploy your extension node to perform these tasks.