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/1.0/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/1.0 |
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 library reference for the location of a SAS data set. SAS-data-set-reference must be a two-level SAS name in the form libref.filename.
Example | SASDataFile=mylib.modelinput |
specifies the library reference for the location of the SAS catalog to store a SAS catalog file. SAS-catalog-reference must be a two-level SAS name in the form libref.catalog.
Example | SASCatalog=mylib.format |
specifies the file reference for the location of a component file that is an ASCII text file. fileref-to-text-file is a one-level SAS reference to a model component file.
Example | TextFile=myfileref |
specifies the file reference for the location of a model component file that is a binary file. fileref-to-binary-file is a one-level SAS reference to a model component file that is not a text file.
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; /*****************************************************/ /* Specify the model component file name and */ /* destination. */ /*****************************************************/ %let WorkPath = c:\myProject\1.0; 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/1.0/ 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\1.0\DTree'; DATA score; set input.dTreeInp; %include dest; run;