Access files in the SAS Model Manager model repository. This macro copies the specified model file to the specified location on a local or network computer.
specifies an identifier to the model in the SAS Model Manager model repository. path-to-model can be either a SAS Model ManagerUUID or a SAS Model Manager path that describes the location of the specific model. ModelId is a required argument. The default value is the value of the _MM_CId macro variable.
Examples | ModelId=b2341a42-0a29-0c76-011a-f7bb7bc4f1e9 |
ModelId=//ModelManagerDefaultRepo/MMRoot/DDHMEQ/HomeEquity/2013/Models/HMEQ%20Loan%20Project |
specifies an identifier of the version to where a champion model resides in the SAS Model Manager model repository. path-to-version can be either a SAS Model Manager UUID or a SAS Model Manager path that describes the location of the version.
Examples | VersionId=b23327cb-0a29-0c76-011a-f7bb3d790340 |
VersionId=//ModelManagerDefaultRepo/MMRoot/DDHMEQ/HomeEquity/2013 |
specifies an identifier of the project object. The identifier specifies the location where the champion model under the default version resides in the SAS Model Manager model repository. path-to-project can be either a SAS Model Manager UUID or a SAS Model Manager path that describes the location of the project.
Examples | VersionId=b232d766-0a29-0c76-011a-f7bb50921b42 |
VersionId=//ModelManagerDefaultRepo/MMRoot/DDHMEQ/HomeEquity |
specifies the destination path for a SAS data set. path-to-SAS-file must be a two-level path in the form libref.filename.
Example | SASDataFile=mylib.modelinput |
specifies the SAS catalog to store a SAS catalog file. path-to-SAS-catalog must be a two-level path in the form libref.catalog.
Example | SASCatalog=mylib.format |
specifies the destination path for a component file that is an ASCII text file. path-to-text-file is a one-level path to a model component file. The path can be a fileref.
Example | TextFile=myfileref |
specifies the destination path for a model component file that is a binary file. path-to-binary-file is a one-level pathname to a model component file that is not a text file. The pathname can be a fileref.
Example | BinaryFile=myfileref |
specifies a name for the model component file that you are retrieving. Use the Name argument when the name of the destination file does not match the name of the file in theSAS Model Manager model repository. The Name argument is the filename within the SAS Model Manager model repository. If Name is not specified, the filename that is registered in the SAS Model Manager model repository 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 |
/******************************************************/
/* Get the score code from a registered model and run */
/* it. */
/******************************************************/
Options NOmlogic NOmprint NOspool;
/*****************************************************/
/* Get the Model Management 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 = miller;
data _null_;
infile pwfile obs=1 length=l;
input @;
input @1 line $varying1024. l;
call symput('_MM_Password',substr(line,1,l));
run;
/*****************************************************/
/* Specify the model component file name and */
/* destination. */
/*****************************************************/
%let WorkPath = c:\myProject\2013;
FILENAME dest '&WorkPath.\score.sas';
/*****************************************************/
/* Set to detect failure in case macro load fails. */
/*****************************************************/
%let _MM_RC = -1;
/*****************************************************/
/* Get score code. */
/*****************************************************/
%MM_GetModelFile(ModelId=//ModelManagerRepo/MMRoot/HomeEquity/HMEQ/2013/
DecisionTree, TextFile=dest);
/*****************************************************/
/* Display Model Management set macro variables. */
/*****************************************************/
Options nosource;
%PUT _MM_RC = &_MM_RC;
%PUT _MM_CId = &_MM_CId;
Options source;
/*****************************************************/
/* Run score code. Sepcify the LIBNAME input path. */
/*****************************************************/
LIBNAME input 'c:\mysascode\2013\DTree';
DATA score;
set input.dTreeInp;
%include dest;
run;