(1) >>-+-pureQueryXML-file-----------------------+--=---------------> '-pureQueryXML-file--:--base-package-name-' >--+---------------------------------------------------------------------------------------------------------------------+--> | (2) (3) | '------------- -url--jdbc--:--db2--:--//--server--+---------+--/--database-- -username--user-ID-- -password--password-' '-:--port-' >--+-----------------------------------------+------------------> '-+- -bindOptions-- -"--bind-options--"-+-' | (4) | '-| DBRM options |--------------------' >--+----------------------------------------------+-------------> | .----------------------. | | V | | '- -configureWarning---- -configure-warnings-+-' >--+-----------------------------+--+----------------+----------> | .-FALSE-. | | (5) | '- -differenceOnly--+-TRUE--+-' '-| -grant |-----' >--+--------------------------+--+--------------------------+---> '- -isolationLevel--+-CS-+-' | .-FALSE-. | +-RR-+ '- -showDetails--+-TRUE--+-' +-RS-+ '-UR-' >--+--------------------------+-------------------------------->< | .-FALSE-. | '- -validateXml--+-TRUE--+-'
The value for each option cannot contain spaces.
For a list and descriptions of these options, see BIND command.
When you specify the Configure utility -optionsFileForBind option, the Configure utility generates a StaticBinder options file. The options file contains the bind options and additional information that is based on the SQL statements, statement sets, and DB2 special register information in the pureQueryXML file. The Configure utility adds the -configureWarning option to the bind options when it detects a possible problem. If you bind packages to the database by using the specified bind options and run the SQL statements statically, the resulting behavior might not be correct.
The Configure utility also adds a warning token to a comment line of the statement set. The comments can contain warnings and information that are related to the statement set and SQL statement in the set. For information about how to fix the warnings, see the information about the tokens that are generated with the warnings in Bind options file created by the Configure utilityIf you specify the -configureWarning option when you run the StaticBinder utility, the utility attempts to bind the associated packages. The StaticBinder utility also prints a warning message indicating the problem specified by the warning.
The -configureWarning option can use the following values:
The Configure utility also adds the token incrementalSpecialRegValuesPresent to a comment line for the statement set.
The Configure utility also adds the token missingSpecialRegValueId(IDs) to a comment line for the statement set.
Configure utility also adds the token SQLGroupedBySpecialRegisters(MULTI_SRINFO) to a comment line of the statement set.
The Configure utility also adds the token SQLGroupedBySpecialRegisters(INCONSISTENT_SRINFO) to a comment line of the statement set.
After the StaticBinder utility generates the DBRM files, you must copy the files to a data set. The default DBRM data set name is prefix.DBRMLIB.DATA, where prefix is the high-level qualifier that is specified in the TSO profile for the user. prefix is usually your user ID in TSO.
If the DBRM data set does not already exist, you must create it. The DBRM data set requires space to hold all the SQL statements, with additional space for each host variable name and some header information. The header information requires approximately two records for each DBRM, 20 bytes for each SQL record, and 6 bytes for each host variable. For an exact format of the DBRM, see the DBRM mapping macro, DSNXDBRM in library prefix.SDSNMACS.
The following syntax diagram describes the options for generating DBRM files.
.-FALSE-. >>- -generateDBRM--+-TRUE--+-- -outputDBRMPath--path-----------><
The root name of the generated DBRM files is the root package name that you specify when you run the Configure utility.
The default is FALSE.
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.
.-,--------------------. V | >>- -grant-- "--grantees--(----+-authorization-ID-+-+--) - "--->< '-PUBLIC-----------'
For DB2 Database for Linux, UNIX, and Windows: You can use the USER, GROUP, and ROLE keywords. For information about these keywords, see GRANT (Package Privileges) statement.
For DB2 for z/OS: You can use the ROLE keyword. For information about this keyword, see GRANT (package privileges).
Restriction: You cannot use the -grant option when the value of the -generateDBRM option is TRUE.
The isolation level applies to all of the SQL statements that are in the package. If you set an isolation level through the Connection.setTransactionIsolation() method of the IBM® Data Server Driver for JDBC and SQLJ, pureQuery ignores that isolation level for statements executed statically.
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.
-url jdbc:db2://localhost:50000/SAMPLE:enableNamedParameterMarkers=1;
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.