Add model component files to an existing SAS Model Manager model.
specifies a SAS Model Manager identifier of the model in the SAS Model Manager repository. The identifier specifies the location in the SAS Model Manager repository where the file is to be added. path-to-model can be either a SAS Model Manager UUID or a SAS Model Manager path. ModelId is a required argument. The default value is the value of the _MM_CId macro variable.
Examples | ModelId=8904daa1-0a29-0c76-011a-f7bb587be79f |
ModelId=//ModelManagerDefaultRepo/MMRoot/DDHMEQ/HomeEquity/2013/Models/HMEQ%20Loan%20Project |
specifies the path to a SAS data set to add to a model in the SAS Model Manager repository. path-to-SAS-file must be a two-level path in the form libref.filename.
Example | SASDataFile=mysascode.hmeqloan |
specifies the path to one or more SAS code model component files to add to a model in the SAS Model Manager repository. path-to-SAS-catalog must be a two-level path in the form libref.catalog. Use the SASCatalog argument to add the catalog to a model.
Example | SASCatalog=mylib.modelinput |
specifies the path to a SAS code model component file that is an ASCII text file. path-to-text-file is a one-level SAS name to a model component file.
Example | TextFile=inputxml |
specifies the path to a SAS code model component file that is a binary file. path-to-binary-file is a one-level SAS name to a model component file that is not a text file.
Example | BinaryFile=gainscsv |
specifies a name for the file that you are adding. Use the Name argument when your model component filename does not follow the SAS Model Manager model component file naming convention that is specified in the model's template file or your model requires a file to have a particular filename. If Name is not specified, the filename that is registered is the name of the file.
Example | Name=score.sas |
specifies whether to supply verbose trace messages to the SAS log.
Default | OFF |
Example | Trace=on |
/****************************************/
/* Adding a file to a registered model. */
/***************************************************/
Options NOmlogic NOmprint NOspool;
/***************************************************/
/* Get the SAS Model Manager macro code. */
/***************************************************/
Filename MMAccess catalog 'SASHELP.modelmgr.AccessMacros.source';
%include MMAccess;
/* Fileref to the encoded password */
FILENAME pwfile 'my-network-path\pwfile';
/***************************************************/
/* Set the SAS WIP Server variables. */
/***************************************************/
%let _MM_Service_Registry_URL=
%STR(http://abcdef.sas.com:7980/SASWIPClientAccess/remote/ServiceRegistry);
%let _MM_User=sasdemo;
data _null_;
infile pwfile obs=1 length=l;
input @;
input @1 line $varying1024. l;
call symput('_MM_Password',substr(line,1,l));
run;
/***************************************************/
/* A LIBNAME for a table. */
/***************************************************/
LIBNAME mtbls 'c:\mysascode';
/***************************************************/
/* Set to detect failure in case macro load fails */
/* and add the input data source. */
/***************************************************/
%let _MM_RC= -1;
%MM_AddModelFile(
ModelId=
//ModelManagerRepo/MMRoot/HomeEquity/HMEQ/2013/hmeqDecTree1,
Name=modelinput.sas7bdat,
SASDataFile=mtbls.myInputVariables,
Trace=Off
);
/***************************************************/
/* A FILENAME for a text file. */
/***************************************************/
FILENAME tcode 'c:\myModel\inputvar.xml';
/***************************************************/
/* Set to detect failure in case macro load fails */
/* and add the xml file for the input data source */
/***************************************************/
%let _MM_RC= -1;
%MM_AddModelFile(
ModelId=
//ModelManagerRepo/MMRoot/HomeEquity/HMEQ/2013/hmeqDecTree1,
TextFile=tcode,
Trace=on);