Create a Sorted List of Potential Donors

To use the SAS Code node to create a list of best potential donors, complete the following steps:
  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.
    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 opens.
    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. From 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 Results in the confirmation window that opens. The Results window opens in which you can view the scored list of potential donors sorted by expected profit.
  6. Close the Results window.