Here is an example of a Promote script that also contains two Filter scripts — a compound script.
This script contains two Filter scripts and one Promote script. The first Filter script searches the library for all resources that have a status of Passed. Since the <LO> tag is set to zero (0), the results of this filter replace any current (existing) results. There are no current results, so you start with the results of this filter.
Because the second Filter script's <LO> tag is set to one (1), this script searches the current results — the results produced by the first Filter script — for resources that have a project equal to P001.
After the utility executes the second Filter script, the results consist of library resources that have a status of Passed and a project of P001. Note that you could have gotten the same results with a single Filter script that specified both of these criteria.
The Promote script then promotes these resources to the test\deflib\master.lby library.
<LBYSCRIPT>
<FILTER>
<LIBRARY VALUE="DEFLIB\MASTER.LBY"/>
<LO VALUE="0"/>
<NAME VALUE=""/>
<DESC VALUE=""/>
<TYPE VALUE=""/>
<VERSION VALUE=""/>
<REVISION VALUE=""/>
<USERID VALUE=""/>
<EFFDATE VALUE=""/>
<LOCKED VALUE=""/>
<MODE VALUE=""/>
<STATUS VALUE="PASSED"/>
<CLASS VALUE=""/>
<PROJECT VALUE=""/>
<OBJECTTYPE VALUE=""/>
<OBJECTNAME VALUE=""/>
<OBJECTTEXT VALUE=""/>
<OBJECTTEXTCASE VALUE=""/>
</FILTER>
<FILTER>
<LIBRARY VALUE="DEFLIB\MASTER.LBY"/>
<LO VALUE="1"/>
<NAME VALUE=""/>
<DESC VALUE=""/>
<TYPE VALUE=""/>
<VERSION VALUE=""/>
<REVISION VALUE=""/>
<USERID VALUE=""/>
<EFFDATE VALUE=""/>
<LOCKED VALUE=""/>
<MODE VALUE=""/>
<STATUS VALUE=""/>
<CLASS VALUE=""/>
<PROJECT VALUE="P001"/>
<OBJECTTYPE VALUE=""/>
<OBJECTNAME VALUE=""/>
<OBJECTTEXT VALUE=""/>
<OBJECTTEXTCASE VALUE=""/>
</FILTER>
<PROMOTE>
<LIBRARY SRC="DEFLIB\MASTER.LBY" TGT="..\TEST\DEFLIB\ MASTER.LBY"/>
<NAME SRC=""/>
<TYPE SRC=""/>
<VERSION SRC=""/>
<REVISION SRC=""/>
<USERID SRC=""/>
<EFFDATE SRC=""/>
<MODE SRC="" TGT="" FINAL=""/>
<STATUS SRC="" TGT="" FINAL=""/>
<CLASS SRC="" TGT="" FINAL=""/>
<PROJECT SRC="" TGT="" FINAL=""/>
</PROMOTE>
</LBYSCRIPT>
Note | If you include a filter in the script and you use the /P parameter (but omit /S), the utility still only promotes the records identified by the filter. For information on the XML tags used in the Filter section, see Filtering Resources. |
© Copyright 2012, Oracle and/or its affiliates. All rights reserved. Legal notices.