Although the anatomy
of an extension node is fairly simple, the fact that an extension
node must function within a SAS Enterprise Miner process flow diagram
requires special consideration. An extension node's functionality
typically allows for the possibility that the process flow diagram
contains predecessor nodes and successor nodes. As a result, your
extension node typically includes code that is designed to capture
and process information from predecessor nodes, and to prepare results
to pass on to successor nodes.
Also, the extension
node deployment process involves stopping and restarting the SAS Enterprise
Miner server. Because software development is inherently an iterative
process, these features introduce obstacles to development that are
not typically encountered in other environments.
Fortunately, a solution
is readily available: the SAS Enterprise Miner SAS Code node. The SAS
Code node provides an ideal environment in which to develop and test
your code. You can place a SAS Code node anywhere in a process flow
diagram. Using the SAS Code node's Code Editor, you can edit and submit
code interactively while viewing the SAS log and output listings.
You can run the process flow diagram path up to and including the SAS
Code node and view the Results window without
closing the programming interface.
Predefined macros and
macro variables are readily available to provide easy access to information
from predecessor nodes. There are also predefined utility macros that
can assist you in generating output for your extension node. In short,
you can develop and test your code using a SAS Code node without ever
having to deploy your extension node.
As a corollary to using
the SAS Code node, it is often helpful to code in small blocks. This
makes it easier to identify and debug any errors in your code. For
example, an unbalanced parenthesis in a macro statement can cause
your extension node to run indefinitely with no message printed to
the log. In this case, as your amount of code grows, so does the amount
of time that you need to find the unbalanced parenthesis.
The differences between
a development and a run-time environment might not be obvious. For
example, a user might develop macros in a 32-bit platform, but attempt
to run them on a 64-bit platform. A more troublesome problem, though,
is when extension nodes are developed in UNIX or Linux and then deployed
in Windows, or in the opposite direction. In this case, PROC CPORT
and PROC CIMPORT should be used to move catalogs between different
operating systems.
After you have determined
that your server code is robust, you need to develop and test the
XML properties file. The XML properties file is used to populate the
extension node's Properties panel, which enables users to set program
options for the node's SAS program.