You can list the pureQueryXML files in the command and use only the defaultOptions entry in the options file.
You can list pureQueryXML files in the command and in the options file. If a file is listed both in the command and in the options file, the StaticBinder utility processes the file. If a file is listed in the options file but not in the command, the StaticBinder utility does not process the file. If a file is listed in the command but not in the options file, the StaticBinder utility processes the file with the options on the command line and in the defaultOptions entry of the options file.
(1) >>-java--com.ibm.pdq.tools.StaticBinder-------------------------> >--+---------------------------------------------------------------------------------------------------------------+--> | (2) | '------- -url--jdbc--:--db2--:--//--server--+---------+--/--database-- -username--user-ID-- -password--password-' '-:--port-' >--+-----------------------------------------------------------------+--> | .---------------------------------------------. | | V | | '- -pureQueryXml----+-pureQueryXML-file-----------------------+-+-' '-pureQueryXML-file--:--base-package-name-' >-- -optionsFile--file-name--+-----------------------------+----> | .-FALSE-. | '- -differenceOnly--+-TRUE--+-' >--+--------------------------+---------------------------------> | .-FALSE-. | '- -showDetails--+-TRUE--+-' .-NOT_SET------. >-- -statementBindError--+-REMOVE-------+-----------------------> '-MARK_INVALID-' >--+-----------------------+------------------------------------> | (3) | '-| Trace options |-----' >--+-------------------------------+----------------------------> '- -verifyPackages--+-DETAIL--+-' '-SUMMARY-' >--+--------------------------+-------------------------------->< | .-FALSE-. | '- -validateXml--+-TRUE--+-'
The file must have the extension .pdqxml or .xml. The file must either be a resource in the classpath for the application or you must provide the full or relative path to the file.
For example, suppose that you run the StaticBinder utility on a pureQueryXML file named capture.pdqxml. The utility creates the packages MYPKGA, MYPKGB, and MYPKGC. Then you edit the statement set MYPKGA in capture.pdqxml with the workbench and run the Configure utility on the file with the -cleanConfigure option at its default value of FALSE. The Configure utility assigns a new consistency token to the statement set because the set has changed. When you run the StaticBinder utility on capture.pdqxml again to bind the new version of MYPKGA, you specify -differenceOnly TRUE. The utility rebinds only MYPKGA and does not rebind the other two packages.
>>-+------------------------+--+---------------------------+--->< '- -traceFile--file-name-' | .-OFF-----. | '- -traceLevel--+-ALL-----+-' +-SEVERE--+ +-WARNING-+ +-INFO----+ +-CONFIG--+ +-FINE----+ +-FINER---+ '-FINEST--'
SQL statements that have been previously marked as invalid do not appear in the report.
You can restore SQL statements that are marked invalid with Configure option -restoreInvalidSQLForce. You can remove the statements with the option -removeInvalidSQL.
If the -statementBindError option is specified with the value MARK_INVALID or REMOVE, the pureQueryXML files must be writeable. If the file cannot be updated by the StaticBinder utility, an error is displayed, and the file is not processed.
The -statementBindError option is not supported when binding pureQuery Data Access Object (DAO) interface implementation classes. If the StaticBinder utility is run to bind an implementation class and the option is specified with the value MARK_INVALID or REMOVE, the utility displays a warning is displayed and does not attempt to bind the classes.
-url jdbc:db2://localhost:50000/SAMPLE:enableNamedParameterMarkers=1;
For example, suppose that you ran the Configure utility on a pureQueryXML named myApp.pdqxml. When you ran the utility, you supplied values for the -collection, -pkgVersion, and -rootPkgName options, and the utility stored these values in the pureQueryXML file. You run the StaticBinder utility, specifying the name of this file, and the utility creates DB2 packages.
At a later time, you want to see a list of the packages that the StaticBinder utility created from the pureQueryXML file. When you run the utility, you can use the -verifyPackages option, specifying the value DETAIL, and again supply the name of the file.
The -verifyPackages option works on the premise that, after you ran the Configure utility on a pureQueryXML file and then ran the StaticBinder utility on that file, you did not run the Configure utility again on the file and supply different values for -collection, -pkgVersion, and -rootPkgName.
If you ran the Configure utility on myApp.pdqxml after you first ran the StaticBinder utility and you changed any of the values for -collection, -pkgName, and -rootPkgName, the StaticBinder utility would not find any packages that matched the new values of these options. In its report, the StaticBinder utility would say that the packages that you were looking for do not exist.
If the values for the -collection, -pkgVersion, and -rootPkgName options are the same as when you ran the StaticBinder utility the previous time, the utility finds the packages and lists them.
You can specify this option together with the -bindOptions option. However, the StaticBinder utility will not bind packages. Use -bindOptions only to specify the collection for the packages that you want to verify if you used this option to specify the collection when you created the packages.
Success or failure of XML schema validation is determined and reported for each input file. If one input file fails, the StaticBinder processing does not stop, subsequent files will be processed.
If a pureQueryXML file fails schema validation, the packages within that file will not be bound. The first schema validation error and the bind failure for the file are reported.
Only current release or previous version pureQueryXML files are validated (version 4 or 3). If an earlier version pureQueryXML is detected, validation is not performed on that file.