You can import an assignment rules table into a model using SAS Profitability Management automation. You can either
To import an assignment rules table into an existing model, you proceed as though you were importing a model with the difference that:
- you specify Action="AddOnly" in your XML configuration file.
The AddOnly attribute specifies that the existing model is retained, and rules in the assignment rules table that don't already exist in the model are added to the model.- in your model import file, you include tags to identify the assignment rules table(s) to be imported.
The following is a sample model import file that can be used to import an assignment rules table:
<?xml version="1.0" encoding="utf-8"?> <Model Name="BabyBank" Action="AddOnly"> <AssignmentRuleTables> <Table Libref="babystar" Name="Rules"> <ColumnMapping Required="name" Actual="AssignmentRule"/> <ColumnMapping Required="selectionCriteria" Actual="SelectionCriteria"/> <ColumnMapping Required="driverFormula" Actual="DriverFormula"/> <ColumnMapping Required="tableGroupName" Actual="TableGroup"/> </Table> </AssignmentRuleTables> </Model>Notes:
- The model import file specifies only the elements being added to the model—in this case, rules. It does not specify elements already in the model, such as its behavior table.
- The model import file can also specify one or more rule association tables to be imported into the model.
- The model import file specifies the actual name of each of the following required columns in the assignment rules table:
Type this: Specify this: Required="name" Actual="your-column-name" Required="selectionCriteria" Actual="your-column-name" Required="driverFormula" Actual="your-column-name" Required="tableGroupName" Actual="your-column-name"
When you import a model, you can specify one or more assignment rules tables to be imported along with the model. You can import an assignment rules table instead of, or in addition to, specifying the individual rules in the model import file. The following shows an example of a model import file that references an assignment rules table to be imported with the model:
By contrast, the following shows a model import file in which the assignment rules are explictly defined inline in the file:
Note: When you export a model from the Profitability Management rich client, rules are defined inline in the export file (unless you choose not to export assignment rules at the same time).
Note: You can both import an assignment rules table and define rules inline, as the following XML file fragment illustrates:
To import an assignment rules table, in addition to creating the XML configuration file, you must also