Create a Sorted List of Potential Donors

To use the SAS Code node to create a list of best potential donors:
  1. Select the Utility tab on the Toolbar.
  2. Select the SAS Code node icon. Drag the node into the Diagram Workspace.
  3. Connect the Score node to the SAS Code node.
    SAS Code Process Flow Diagram
  4. Select the SAS Code node. In the Properties Panel, scroll down to view the Train properties, and click on the ellipses that represent the value of Code Editor. The Training Code — Code Node window appears.
    1. In the Training Code box, enter the following SAS code, where <LIBREF> is the libref of the diagram:
      proc sort data= <LIBREF>.Score_SCORE out= bestlist;
      by descending ep_target_b;
      run;
      
      proc print data= bestlist;
      var control_number ep_target_b;
      run;
      Tip
      To determine the libref of the diagram, select the diagram in the Project Panel and then view the diagram ID in the Properties Panel. The diagram ID is the libref that you should use.
    2. On the File menu, select Save All. Then, close the window.
  5. In the Diagram Workspace, right-click the SAS Code node, and select Run from the resulting menu. Click Yes in the Confirmation window that opens. In the Run Status window, click Results. The Results window appears in which you can view the scored list of potential donors sorted by expected profit.
  6. Close the Results window.
Tip
Predictive Modeling with SAS Enterprise Miner: Practical Solutions for Business Applications” offers comparisons and combinations of different models, as well as examples of scoring new data.