To open this file in an editor in the workbench, double-click it. The file is located in the folder dataAccessFolder in your Java project.
In this file, you can specify options that apply to all of the pureQueryXML files that are in your project. You can also specify options specific to individual pureQueryXML files.
You can add comments to this file. Begin each comment with a # symbol.
As you create or edit entries, you can type CTRL+SPACE (or your own keystroke, if you changed this default one) for assistance.
For help understanding syntax diagrams, see How to read syntax diagrams.
After you save the file, the workbench runs the Configuration utility on it and refreshes the SQL Outline view. The view still shows only unbound packages because you did not yet perform the bind operation.
The following diagram shows the syntax that is allowed for setting default options for all of the pureQueryXML files that the file lists.
>>-defaultOptions--=--+-----------------------------------+-----> | .-NULLID----------. | '- -collection--+-collection-name-+-' >--+--------------------------------+---------------------------> '- -pkgVersion-- -+-AUTO-------+-' '-version-ID-' >--+--------------------------------------------------------+---> '- -allowStaticRowsetCursors--+-READ_ONLY--------------+-' +-READ_ONLY_SCROLLABLE---+ +-READ_ONLY_FORWARD_ONLY-+ '-NEVER------------------' >--+---------------------------------------+--------------------> | .-FALSE-. | '- -forceSingleBindIsolation--+-TRUE--+-' >--+------------------------+--+-----------------------+------->< | .-100----. | | (1) | '- -sqlLimit--+-number-+-' '-| Trace options |-----'
The next syntax diagram shows the syntax that is allowed for setting options for individual pureQueryXML files that the file lists.
>>-pureQueryXML-file--+-----------------------------------+-----> | .-NULLID----------. | '- -collection--+-collection-name-+-' >--+--------------------------------+---------------------------> '- -pkgVersion-- -+-AUTO-------+-' '-version-ID-' >-- -rootPkgName--package-name-stem-----------------------------> >--+--------------------------------------------------------+---> '- -allowStaticRowsetCursors--+-READ_ONLY--------------+-' +-READ_ONLY_SCROLLABLE---+ +-READ_ONLY_FORWARD_ONLY-+ '-NEVER------------------' >--+-----------------------------+------------------------------> | .-FALSE-. | '- -cleanConfigure--+-TRUE--+-' (1) >--+---------------------------------------+--------------------> | .-FALSE-. | '- -forceSingleBindIsolation--+-TRUE--+-' >--+----------------------------------------------------------------+--> | .----------------------------------. | | V | | '- -replaceLocations--"----(--original_name-->--new_name--)-+--"-' >--+--------------------------------------------------------------+--> | .----------------------------------. | | V | | '- -replaceSchemas--"----(--original_name-->--new_name--)-+--"-' >--+------------------------+--+-----------------------+------->< | .-100----. | | (2) | '- -sqlLimit--+-number-+-' '-| Trace options |-----'
In addition to the file name, you must specify an absolute path to the file.
Only DB2 for z/OS supports rowset cursors. Rowset cursors are used only when the IBM Data Server Driver for JDBC and SQLJ properties indicate that they should be used. If you capture from a different type of data source or without having rowset cursors enabled, none of the statements that are captured use rowset cursors.
When rowset cursors are not used for forward-only cursors, a Type 4 connection can internally use a similar mechanism to minimize network traffic.
This option takes one of four values:
You do not need to use this option if either of these conditions is true:
pureQuery considers a statement as updatable if either of these conditions are true:
If you run statements statically against a data source that does not support rowset cursors, pureQuery does not try to use a rowset cursor for any statements that you specified to use one.
The Configure utility disables rowset cursors for any SQL statements for which pureQuery Runtime does not support rowset cursors, even if the IBM Data Server Driver for JDBC and SQLJ used rowset cursors for those statements.
If you do not specify this option and pureQuery Runtime supports rowset cursors for the statement, pureQuery uses rowset cursors for statements that the IBM Data Server Driver for JDBC and SQLJ used rowset cursors for when you captured statements.
For all statement sets, the Configure utility sets the value of configureStatus to AUTO during the configuration process. Overrides the statement set configureStatus value of FINAL.
FALSE is the default value.
For unnamed statement sets, configuration applies all specified options.
For named statement sets with the value of the configureStatus set to REQUIRED, some options are applied. Options that are applied include the -collection, -pkgVersion , -forceSingleBindIsolation, and -markDDLForBind options. The consistency token is updated. If you run SQL statements in the statement set statically, you need to rebind the package that is created from the statement set.
During the configuration process, the Configure utility changes the value of configureStatus from REQUIRED to AUTO.
For named statement sets with the value of the configureStatus set to AUTO, the Configure utility applies options only if it determines that the statement set must be modified. The consistency token is not updated if the statement set is not modified. When the configureStatus flag is set to AUTO and the -pkgVersion option is specified, the utility updates the statement set using the version ID. If you run SQL statements in the statement set statically and the statement set is modified, you need to rebind the package that is created from the statement set.
For named statement sets with the configureStatus flag set to FINAL, the Configure utility displays errors when problems are found with the statement set. Errors include section numbers not in increasing order and position update statements not associated with a SELECT statement. The Configure utility displays warnings when statements need to be removed from a statement set. For example, a statement might be removed from a statement set when the -removeSQLInactiveForDays option is specified and the timestamp for the statement matches the removal criteria. A statement might be moved to another statement set if the special register values associated with the statement changes.
If the -groupSQLBySpecialRegisters option is specified, a warning is logged if a change to a special register attribute has occurred. No error is issued in this case.
If you want to use the -isolationLevel option to bind a single statement set into two or three different packages, with each package at a different isolation level, do not use the -forceSingleBindIsolation option when you run the Configure utility on the pureQueryXML file in which the statement set appears.
For example, in an options file for the StaticBinder utility, suppose that you included these two entries:
C:/dir/captureFile.pdqxml:MYPKGA = -isolationLevel UR
C:/dir/captureFile.pdqxml:MYPKGA = -isolationLevel CS
If you used the -forceSingleBindIsolation option when you ran the Configure utility on the captureFile.pdqxml file, the StaticBinder utility performs these actions:
The result is a single MYPKGA package that is bound at the CS isolation level.
If you want the result to be two MYPKGA packages, one at the UR and the other at the CS isolation level, do not use the -forceSingleBindIsolation option when you run the Configure utility on captureFile.pdqxml.
DB2 allows multiple versions of a package to exist at the same time, so that you can bind new packages without replacing older versions of packages with the same names. If you encounter problems with a newer package, you can use an older version of that package.
The Configure utility also creates a copy of the pureQueryXML file, appending the version ID to the name of the file.
The version ID can include only characters that are valid for file names on your operating system. Also, the length of the string and the name of the package cannot exceed the length that your operating system supports for file names.
If you specify this option and the Configure utility does not change the pureQueryXML file, the utility does not create a copy of the pureQueryXML file.
If you do not specify this option, database packages that result from subsequent binds are created without a version and a copy of the file is not created.
Verification of the version at run time is based on the consistency token, not the version name.
package-name-stem must be within the constraints that are set by the DB2 database that you are using.
If you plan to use the pureQuery StaticBinder utility to generate DBRM files rather than create DB2 packages, package-name-stem must be in uppercase and should be no more than 6 characters long. The Configure utility adds characters to the name stem when either the pureQueryXml file contains DDL statements, or the number of statements per package (specified with sqlLimit) is reached. If you use the StaticBinder utility to generate a DBRM file and the combination of package-name-stem, the extra characters due to the activity of the Configure utility, and the isolation level is longer than 8 characters, the StaticBinder utility throws an exception.
-replaceLocations "(SAMPLE > SAMPLE1) (STLEC1 > STLEC2)"
-replaceLocations "(\"test1\">\"prod1\")"
Name replacement is a single pass process. For example, if you specify the replacement string "(S1>S2) (S2>S3)", the occurrences of S1 are replaced with S2 and the original occurrences of S2 are replaced by S3. The Configure utility does not replace S1 with S2 in one pass and then replace S2 with S3 in another pass. For name replacement examples, see the example at the end of this topic.
This option is supported for only DB2 for z/OS Version 10 and DB2 for Linux, UNIX, and Windows Version 9.8. The Configure utility does not prevent location name replacement with other versions of the supported databases. The utility displays a warning when you specify a pureQueryXML file that is used with later versions of the database. For earlier database versions, a warning is not displayed. The Configure utility determines the database and version from information in the pureQueryXML file.
Before you use the Configure utility with the -replaceLocations option, the JAR file pdqsqlparser.jar must be added to your classpath. The JAR file is in the pureQuery Runtime installation directory lib/sqlparser.
The values of other options have no effect on the -replaceLocations and -replaceSchemas options. The replacement of names is done prior to applying other options, apart from -cleanConfigure and -setPreStatusOfAllPkgs.
-replaceSchemas "(MYSCH1 > MYSCH2) (MYSCH3 > MYSCH4)"
-replaceSchemas "(\"schmTest\">\"schmProd\")"
Name replacement is a single pass process. For example, if you specify the replacement string "(S1>S2) (S2>S3)", the occurrences of S1 are replaced with S2 and the original occurrences of S2 are replaced by S3. The Configure utility does not replace S1 with S2 in one pass and then replace S2 with S3 in another pass. For name replacement examples, see the example at the end of this topic.
This option is supported for only DB2 for z/OS Version 10 and DB2 for Linux, UNIX, and Windows Version 9.8. The Configure utility does not prevent schema name replacement with other versions of the supported databases. The utility displays a warning when you specify a pureQueryXML file that is used with later versions of the database. For earlier database versions, a warning is not displayed. The Configure utility determines the database and version from information in the pureQueryXML file.
Before you use the Configure utility with the -replaceSchemas option, the JAR file pdqsqlparser.jar must be added to your classpath. The JAR file is in the pureQuery Runtime installation directory lib/sqlparser.
See the -replaceLocations option for information about the affects of the value of configureStatus attribute and the -cleanConfigure and -setPreStatusOfAllPkgs options.
The default value is 100.
Package with first 100 SQL statements | Package with next n SQL statements, with 100 < n < 200 | |
---|---|---|
Isolation level CS | myPackageA1 | myPackageB1 |
Isolation level RR | myPackageA2 | myPackageB2 |
Isolation level RS | myPackageA3 | myPackageB3 |
Isolation level UR | myPackageA4 | myPackageB4 |
The numbers designate the isolation level of the packages, and the letters designate the number of packages that are created due to the value of sqlLimit and the number of statements in the pureQueryXML file. The letters proceed down the English alphabet. If the letter z is reached and more packages need to be created, letters continue to be appended: AA, AB, AC, and so on. If the names become too long for your database, reduce the length of your root package name or increase the value of sqlLimit. You can also use the -forceSingleBindIsolation option to remove the number that indicates the isolation level, if you plan to create a package for a single isolation level.
There are situations in which the Configure utility exceeds the SQL statement limit when creating statement sets that represent DB2 packages. All SQL statements that manipulate a cursor must be in the same package as the DECLARE CURSOR statement for that cursor. For example, if an application runs fifteen different UPDATE statements that refer to the same cursor, all fifteen statements must be in the DB2 package where the DECLARE CURSOR statement for that cursor is located.
For the best performance of your application, do not set sqlLimit to a value higher than 400.
>>-+------------------------+--+---------------------------+--->< '- -traceFile--file-name-' | .-OFF-----. | '- -traceLevel--+-ALL-----+-' +-SEVERE--+ +-WARNING-+ +-INFO----+ +-CONFIG--+ +-FINE----+ +-FINER---+ '-FINEST--'