For example, suppose that you have this simple options file, named hr_bind.opt:
defaultOptions = -bindOptions "QUALIFIER qual1" -traceFile C:\logs\staticbinder.txt -traceLevel ALL capture_sales.pdqxml = -bindOptions "QUALIFIER qual2" capture_orders.pdqxml capture_employee.pdqxml
You want the StaticBinder utility to process only capture_sales.pdqxml. Rather than comment out the entries for capture_orders.pdqxml and capture_employee.pdqxml, and rather than avoid using the options file by specifying all of the bind options in the command, you can use this example command:
java com.ibm.pdq.tools.StaticBinder -url jdbc:db2://dioud8:50000/hr -username someID -password somePwd -pureQueryXml capture_sales.pdqxml -optionsFile hr_bind.opt
The StaticBinder binds packages for all of the statement sets that are in capture_sales.pdqxml, using the qualifier qual2 and the non-conflicting options in the defaultOptions entry, as well as the URL, user ID, and password that are specified in the command..
You could list other files in the -pureQueryXml portion of the command, like this:
-pureQueryXml capture_sales.pdqxml capture_employee.pdqxml capture_inventory.pdqxml
Because capture_employee.pdqxml has an entry in the options file, the StaticBinder utility binds packages for all of the statement sets that are in capture_employee.pdqxml, using the options on the command line and in the defaultOptions entry.
Because capture_inventory.pdqxml does not have an entry in the options file, the StaticBinder utility uses the options in the defaultOptions entry and options in the command when binding packages for all of the statement sets that are in this pureQueryXML file.
The following table describes the output of the StaticBinder utility when you list pureQueryXML files and statement sets in a command, and you also specify an options file.
Entry on the command line | Is there an entry for name.pdqxml file in the options file? | Is there an entry for name.pdqxml:base-package-name in the options file? | Output of StaticBinder utility |
---|---|---|---|
pureQueryXML-file | Yes | Yes | The output depends upon the order of the entries, as described in Example of listing pureQueryXML files and statement sets in options files. |
No | No | Using the options on the command line and the non-conflicting options in the defaultOptions entry, bind packages for all of the statement sets in the file. | |
Yes | No | Bind packages for all of the statement sets in pureQueryXML-file, using the options in the three possible locations. | |
No | Yes | Using the options on the command line and in the defaultOptions entry, bind packages for all of the statement sets in the file. Then, bind a package again for the statement set in the entry for pureQueryXML-file:base-package-name, using the options in the three possible locations. | |
pureQueryXML-file:base-package-name | Yes | Yes | The output depends upon the order of the entries, as described in Example of listing pureQueryXML files and statement sets in options files. |
No | No | Using the options on the command line and the non-conflicting options in the defaultOptions entry in the options file, bind a package for the statement set that corresponds to pureQueryXML-file:base-package-name. | |
Yes | No | Using the options on the command line, the non-conflicting in the entry for pureQueryXML-file, and the non-conflicting options in the defaultOptions entry, bind a package for the statement set that corresponds to pureQueryXML-file:base-package-name. | |
No | Yes | Using the options on the command line, the non-conflicting options in the entry for pureQueryXML-file:base-package-name, and the non-conflicting options in the defaultOptions entry, bind a package for the statement set that corresponds to that entry. |