Command Reference > Working with pmrep Files > Deployment Control File Examples
  

Deployment Control File Examples

The parameters you specify in the deployment control file code determine the actions that occur when you execute the DeployFolder or DeployDeploymentGroup commands in pmrep. The following examples discuss instances in which you use the DeployFolder and DeployDeploymentGroup commands with a deployment control file.

Deploying the Latest Version of a Folder

You can deploy the latest version of a folder and include all dependencies. For example, you need to retain the current values in a Sequence Generator transformation, and you need to point the shortcuts from the sc_folder to the new_sc_folder. After you copy the folder, you want to rename it to “new_year.”
You might create a control file with following attributes:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE DEPLOYPARAMS SYSTEM "depcntl.dtd">
<DEPLOYPARAMS DEFAULTSERVERNAME ="info7261"
COPYPROGRAMINFO ="NO"
  COPYWFLOWVARPERVALS ="NO"
COPYWFLOWSESSLOGS ="NO"
COPYDEPENDENCY ="YES"
LATESTVERSIONONLY = "NO">
  
<REPLACEFOLDER FOLDERNAME ="NEW_YEAR"
RETAINMAPVARPERVALS ="YES"/>

<OVERRIDEFOLDER SOURCEFOLDERNAME ="SC_FOLDER"
OVERRIDEFOLDERNAME ="NEW_SC_FOLDER"/>

</DEPLOYPARAMS>

Deploying the Latest Version of a Deployment Group

You can deploy the latest version of a deployment group and apply a label to the objects in the deployment group. For example, you want to apply the label NEW_SRC_LABEL_NAME to all objects in the source group, and NEW_TGT_LABEL_NAME to all objects in the target group. You might create a control file with following attributes:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE DEPLOYPARAMS SYSTEM "depcntl.dtd">
<DEPLOYPARAMS DEFAULTSERVERNAME="dg_sunqa2_51880"
   COPYPROGRAMINFO="YES"
   COPYMAPVARPERVALS="YES"
   COPYWFLOWVARPERVALS="YES"
   COPYWFLOWSESSLOGS="NO"
   COPYDEPENDENCY="YES"
   LATESTVERSIONONLY="YES"
   RETAINGENERATEDVAL="YES"
   RETAINSERVERNETVALS="YES">
<DEPLOYGROUP CLEARSRCDEPLOYGROUP="NO">
<OVERRIDEFOLDER SOURCEFOLDERNAME="SRC_FOLDER1"
   SOURCEFOLDERTYPE="LOCAL"
   TARGETFOLDERNAME="TGT_FOLDER1"
   TARGETFOLDERTYPE="LOCAL"/>
<APPLYLABEL SOURCELABELNAME="NEW_SRC_LABEL_NAME"
   SOURCEMOVELABEL="YES"
   TARGETLABELNAME="NEW_TGT_LABEL_NAME"
   TARGETMOVELABEL="YES" />
</DEPLOYGROUP>
</DEPLOYPARAMS>

Listing Multiple Source and Target Folders

Use the OVERRIDEFOLDER element in the control file to list multiple source and target folders. Use the SOURCEFOLDERNAME and TARGETFOLDERNAME attributes to specify the following folders in the source and target repositories:
When you run the pmrep command, DeployDeploymentGroup, the deploy process picks the right target folder to use after checking the objects in the deployment group.
For example, if a deployment group contains objects in two folders with shortcuts to a third folder, you can create a control file with three occurrences of OVERRIDEFOLDER. The following sample control file deploys a deployment group that contains objects in the folders OBJECTFOLDER1 and OBJECTFOLDER2 that contain shortcuts pointing to the folder SHAREDSHORTCUT:
<!DOCTYPE DEPLOYPARAMS SYSTEM "depcntl.dtd">
<DEPLOYPARAMS DEFAULTSERVERNAME="dg_sun_71099"
   COPYPROGRAMINFO="YES"
   COPYMAPVARPERVALS="YES"
   COPYWFLOWVARPERVALS="YES"
   COPYWFLOWSESSLOGS="NO"
   COPYDEPENDENCY="YES"
   LATESTVERSIONONLY="YES"
   RETAINGENERATEDVAL="YES"
   RETAINSERVERNETVALS="YES">
<DEPLOYGROUP CLEARSRCDEPLOYGROUP="NO">
<OVERRIDEFOLDER SOURCEFOLDERNAME="OBJECTFOLDER1"
   SOURCEFOLDERTYPE="LOCAL"
   TARGETFOLDERNAME="OBJECTFOLDER1"
   TARGETFOLDERTYPE="LOCAL"/>
<OVERRIDEFOLDER SOURCEFOLDERNAME="OBJECTFOLDER2"
   SOURCEFOLDERTYPE="LOCAL"
   TARGETFOLDERNAME="OBJECTFOLDER2"
   TARGETFOLDERTYPE="LOCAL"/>
<OVERRIDEFOLDER SOURCEFOLDERNAME="SHAREDSHORTCUTS"
   SOURCEFOLDERTYPE="GLOBAL"
   TARGETFOLDERNAME="SHAREDSHORTCUTS"
   TARGETFOLDERTYPE="GLOBAL"/>
</DEPLOYGROUP>
</DEPLOYPARAMS>