To import a model with SAS Profitability Management automation, you must create an XML configuration file to control the task. A sample configuration file, importBaby.xml, is provided. Its content is as follows:
<Operation Model="BabyBank New"> <Task Type="Import" Action="Replace"> <Source Type="XML" FilePath="BabyBank.xml"/> </Task> </Operation>
The XML configuration file contains the following attributes that you must specify:
Attribute | Value |
Model= | specifies the name to be assigned to the model after it is imported. |
Task Type= | Import |
Action= | Replace | AddOnly Replace specifies to delete an existing model with the same name and replace it with the model being imported. Note: If you specify Replace and there is no existing model of the same name, the import process creates a new model of that name. AddOnly specifies to retain an existing model with the same name and add to it the elements being imported, such as additional rules, rule associations, and transaction tables. Note: If you specify AddOnly and there is no existing model of the same name, the import process attempts to create a new model from the import file. |
Source Type= | XML Only XML format is supported for import. |
FilePath= | specifies the filename, or path and filename, of the file to be imported. The file is imported from the current directory if you do not specify a path. The easiest way to create an XML file for import is by exporting an existing application. BabyBank.xml is a sample XML file for importing a model. Note: The XML import file must contain a specification of the data libraries to be used. You can override the data library specifications by including <DataLibrary> tags in the import file. |
To import a model, in addition to creating the XML configuration file, you must also:
Note: You can construct your xml configuration file to perform multiple tasks with a single job. For example, the following configuration file imports a model and calculates it:
<Operation Model="BabyBank New"> <!-- Import BabyBank as BabyBank New --> <Task Type="Import" Action="Replace"> <Source Type="XML" FilePath="BabyBank.xml"/> </Task> <!-- Calculate BabyBank New --> <Task Type="Calculate" NumberOfSessions="1"> <ExceptionReport> Libref="bbankout" TransactionSuffix="_UT" BehaviorSuffix="_UB"> </ExceptionReport> <TransactionTableGroups> <TransactionTableGroup Name="ABMCost"/> <TransactionTableGroup Name="CallCenter"/> <TransactionTableGroup Name="Revenue"/> </TransactionTableGroups> <Periods> <Period Name="2008_Q4_Actual"/> <Period Name="2008_Q4_Budget"/> </Periods> <SummaryReports> <Report Name="Eastern"/> <Report Name="Western"/> </SummaryReports> </Task> </Operation>