Syntax of entries in the Default.genProps file for configuring support of static SQL in pureQuery code

Use the Default.genProps file to set options for the DB2® packages that you want to contain bound SQL statements.

In this file, you can specify options that apply to all of the interfaces that are in your project. You can also specify options specific to individual interfaces.

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.

The following diagram shows the syntax that is allowed for setting default options for all of the interfaces that the file lists.

Read syntax diagramSkip visual syntax diagram
>>-defaultOptions--=-------------------------------------------->

>--+---------------------------------------------+-------------->
   '- -baseDataOverride--Java-package.class-name-'   

>--+-----------------------------------+------------------------>
   |               .-NULLID----------. |   
   '- -collection--+-collection-name-+-'   

>--+--------------------------------+--------------------------->
   '- -pkgVersion-- -+-AUTO-------+-'   
                     '-version-ID-'     

>--+---------------------------------------+-------------------->
   |                             .-FALSE-. |   
   '- -forceSingleBindIsolation--+-TRUE--+-'   

>--+---------------------+--+-----------------------+----------><
   '- -xmlFile--XML-file-'  |                   (1) |   
                            '-| Trace options |-----'   

Notes:
  1. For the syntax, see the description of these options.

The next syntax diagram shows the syntax that is allowed for setting options for individual interfaces that the file lists.

Read syntax diagramSkip visual syntax diagram
>>-Java-package.interface--=------------------------------------>

>--+---------------------------------------------+-------------->
   '- -baseDataOverride--Java-package.class-name-'   

>--+-----------------------------------+------------------------>
   |               .-NULLID----------. |   
   '- -collection--+-collection-name-+-'   

>--+--------------------------------+--------------------------->
   '- -pkgVersion-- -+-AUTO-------+-'   
                     '-version-ID-'     

>--+----------------------------------+------------------------->
   '- -rootPkgName--package-name-stem-'   

>--+---------------------------------------+-------------------->
   |                             .-FALSE-. |   
   '- -forceSingleBindIsolation--+-TRUE--+-'   

>--+---------------------+-------------------------------------><
   '- -xmlFile--XML-file-'   

-baseDataOverride Java-package.class-name
Lets you specify the name of a Java class that the generated implementation class will extend. By default, generated implementation classes extend the class com.ibm.pdq.runtime.generator.BaseData. By specifying your own class, you can extend the generated implementation class with your own methods.
defaultOptions
Specifies that the options on the line apply to the SQL statements in all of the interfaces that are listed in this file. Only one line in the file is allowed to start with this keyword.
Java-package.interface (at the beginning of a line in an options file)
Specifies that the options on the line apply only to the SQL statements in the specified interface. These options override options that you specify as defaults.
You must qualify the name of the interface with the name of the Java package to which the interface belongs.
-collection collection-name
The qualifier for the packages that the pureQuery StaticBinder utility binds. The qualifier must meet the constraints for collection names for the DB2 database that you are using.
If you do not specify this parameter, the value defaults to NULLID.
-pkgVersion AUTO|version-ID
Specifies the package version to use when packages are bound.

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.

AUTO
Specifies that the version ID is automatically generated by using the current timestamp. A single timestamp is used for the version ID.
version-ID
Specifies the version identifier for a package. The string must be valid for the version of DB2 that you are using.

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.

-rootPkgName package-name-stem
Specifies the stem of the name to use for DB2 packages. For a full discussion of how the Configure utility creates the names of DB2 packages, see the description for sqlLimit.

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.

-forceSingleBindIsolation TRUE|FALSE
Specifies whether you plan to create a DB2 package for only a single isolation level and do not want a number appended to the name of the package to indicate the isolation level. The default value is false, which means that a numeric indicator is appended.
Use this option together with the -isolationLevel option in the Default.bindProps file.

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:

  1. Bind the package MYPKGA at the UR isolation level.
  2. Rebind the package MYPKGA at the CS isolation level.

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.

Trace options
You can specify the file to log messages in and the level of information to log.
Read syntax diagramSkip visual syntax diagram
>>-+------------------------+--+---------------------------+---><
   '- -traceFile--file-name-'  |               .-OFF-----. |   
                               '- -traceLevel--+-ALL-----+-'   
                                               +-SEVERE--+     
                                               +-WARNING-+     
                                               +-INFO----+     
                                               +-CONFIG--+     
                                               +-FINE----+     
                                               +-FINER---+     
                                               '-FINEST--'     

-traceFile file-name
Specifies the absolute or relative path and name of the file to use for logging information about the operation.
If the file already exists, pureQuery appends new messages to the existing content of the file. As the default, the entries are written to System.err.
-traceLevel OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST|ALL
Specifies the type of information to log. The default level is OFF. If you do not specify a file in which to write the log entries and you set this option to any value other than OFF, the entries are written to the Console view.
-xmlFile XML-file
The name of the XML configuration file that contains SQL that specifies or overrides the SQL in the methods that are defined in the interface. An XML configuration file can also override the definitions of the corresponding beans.

Feedback