Register one model or multiple models simultaneously to the model repository from a single directory. Each model is located in a subdirectory under the specified directory.
specifies the SAS Model Manager UUID for an existing version in the SAS Model Manager model repository where the models are registered. path-to-version can be either a SAS Model Manager UUID or a version path.
Default | the value of the _MM_CId macro variable |
Note | This argument is required. |
Examples | VersionId=b23327cb-0a29–0c76–011a-f7bb3d790340 |
VersionId=//ModelManagerDefaultRepo/MMRoot/DDHMEQ/HomeEquity/2013 |
specifies the directory that contains the models to be registered.
Note | This argument is required. |
specifies whether to supply verbose trace messages to the SAS log.
Default | OFF |
Example | Trace=on |
Requirement Type
|
Enterprise Miner Models
|
SAS Code Models
|
---|---|---|
Value of ReportDir
|
a valid directory name
|
a valid directory name
|
Model subdirectory name
|
the subdirectory name
must be the name of the model
|
the subdirectory name
must be the name of the model
|
Contents of the subdirectory
|
one file named miningResult.spk
|
Required files:
Optional files:
|
<?xml version="1.0" encoding="utf-8" ?> <Model> <ModelMetadata> <name>hmeq</name> <description>Home Equity Model</description> <label>HMEQ</label> <algorithm></algorithm> <function>classification</function> <modeler></modeler> <tool>SASProc</tool> <toolversion></toolversion> <subject></subject> <modelTemplate>Classification</ModelTemplate> <scoreCodeType>SAS Program</scoreCodeType> </ModelMetadata> <FileList> <File> <name>score.sas</name> <value>myScoreFile.sas</value> </File> <File> <name>modelinput.sas7bdat</name> <value>hmeqIn</value> </File> <File> <name>modeloutput.sas7bdat</name> <value>hmeqOut</value> </File> <File> <name>target.sas7bdat</name> <value>hmeqTar</value> </File> <File> <name>inputvar.xml</name> <value></value> </File> <File> <name>outputvar.xml</name> <value></value> </File> <File> <name>targetvar.xml</name> <value></value> </File> <File> <name>train.sas7bdat</name> <value></value> </File> <File> <name>Training.sas</name> <value></value> </File> <File> <name>Training.log</name> <value></value> </File> <File> <name>Training.lst</name> <value></value> </File> <File> <name>outest.sas7bdat</name> <value></value> </File> <File> <name>outmodel.sas7bdat</name> <value>om</value> </File> <File> <name>Output.spk</name> <value></value> </File> <File> <name>Format.sas7bcat</name> <value></value> </File> <File> <name>Dataprep.sas</name> <value></value> </File> <File> <name>Notes.txt</name> <value></value> </File> </FileList> </Model>
/**************************************************/
/* Register a SAS Code Model By Folder */
/*****************************************************/
Options nomlogic nomprint nospool;
/*****************************************************/
/* Load and access 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 location of the folder. */
/******************************************************/
%let modelFolder = c:\myModel;
%let hmeq2013 = //ModelManagerModelRepos/MMRoot/HomeEquity/HMEQ/2013;
/******************************************************/
/* Set to detect failure in case macro load fails */
/* and register the models in the model repository. */
/******************************************************/
%let _MM_RC= -1;
%MM_RegisterByFolder(VersionId=&hmeq2013, ReportDir=&modelFolder, Trace=ON);
/****************************************************/
/* Display the defined variables. */
/****************************************************/
Options nosource;
%PUT _MM_RC = &_MM_RC;
Options source;