Example: Add a Folder, Project, and Version, Set Properties

%let _MM_User=your-userID;
%let _MM_Password=your-password;
%let _MM_Service_Registry_URL=%STR(http://your-web-service.com:7980/
SASWIPClientAccess/remote/ServiceRegistry);
libname temp 'your-path';
data temp.property;
   length name $ 30 value $ 40;
   input name $ value $;
   infile datalines;
datalines;
ProjectInputDS MMLIB.HMEQ_PROJECT_INPUT
ProjectOutputDS MMLIB.HMEQ_PROJECT_OUTPUT
ScoreInputDS MMLIB.HMEQ_SCORE_INPUT
ScoreOutputDS MMLIB.HMEQ_SCORE_OUTPUT
TrainDS MMLIB.HMEQ_TRAIN
TestDS MMLIB.HMEQ_TEST
ClassTargetEvent 1
ClassTargetLevel BINARY
ClassTargetVar BAD
EventProbabilityRole SCORE
;
run;

/* Access the macros  */

filename file1 catalog 'sashelp.modelmgr.accessmacros.source';                                                                                                                                                                                             
%include file1;                                                                                                                                                                                                                                                
filename file1;

filename file2 catalog 'sashelp.modelmgr.mdlmgr_addfolder.source';                                                                                                                                                                                             
%include file2;                                                                                                                                                                                                                                                
filename file2;

filename file3 catalog 'sashelp.modelmgr.mdlmgr_addproject.source';                                                                                                                                                                                             
%include file3;                                                                                                                                                                                                                                                
filename file3;

filename file4 catalog 'sashelp.modelmgr.logtrace.source';                                                                                                                                                                                             
%include file4;                                                                                                                                                                                                                                                
filename file4;

filename file5 catalog 'sashelp.modelmgr.mdlmgr_addversion.source';                                                                                                                                                                                             
%include file5;                                                                                                                                                                                                                                                
filename file5;

filename file6 catalog 'sashelp.modelmgr.mdlmgr_setproperty.source';                                                                                                                                                                                             
%include file6;                                                                                                                                                                                                                                                
filename file6

/*add folder*/
%mdlmgr_AddFolder( parentId=//ModelManagerDefaultRepo/MMRoot,                                                                                                                                                                                                                                    
                     name=Bank3,                                                                                                                                                                                                                                     
                     desc=,                                                                                                                                                                                                                                     
                     newFolderId=newFolderIdVar,                                                                                                                                                                                                                
                     Trace=on);
/*add project*/
%mdlmgr_AddProject( parentId=&newFolderIdVar,                                                                                                                                                                                                                                   
                      name=HMEQ,                                                                                                                                                                                                                                    
                      desc=Home Equity,                                                                                                                                                                                                                                    
                      modelFunction=classification,                                                                                                                                                                                                             
                      inputVarTable=,                                                                                                                                                                                                                           
                      outputVarTable=,                                                                                                                                                                                                                          
                      newProjectId=newProjectIdVar1,                                                                                                                                                                                                             
                      Trace=on);

/*set properties*/
%mdlmgr_SetProperty( folderId=&newProjectIdVar1,                                                                                                                                                                                                                                  
                       table=temp.property,                                                                                                                                                                                                                                  
                       propertyType=system,                                                                                                                                                                                                                     
                       folderType=project,                                                                                                                                                                                                                             
                       Trace=on);

/*add version*/
%mdlmgr_AddVersion( parentId=&newProjectIdVar1,                                                                                                                                                                                                                                   
                      name=2013,                                                                                                                                                                                                                                    
                      desc=,                                                                                                                                                                                                                                    
                      newVersionId=newVersionIdVar1,                                                                                                                                                                                                             
                      Trace=off);