If you finished changing some of the statement sets that
are in a pureQueryXML file and you want to preserve those changes,
but you need to run the Configure utility on the file because of other
unfinished statement sets, you can prevent the Configure utility from
modifying the finished statement sets.
About this task
A statement set within
a pureQueryXML file is a set of statements that form the basis of
one or four DB2® packages, depending
on whether you want a package for one isolation level or one package
for each of the four isolation levels.
Procedure
To
preserve one or more statement sets from changes by the Configure
utility:
- Open the pureQueryXML file in a text editor.
Recommendation: IBM® strongly recommends
that you edit pureQueryXML files by using the workbench only. If you
edit a pureQueryXML file outside of the workbench, you risk making
the file unusable.
If you must edit a pureQueryXML file outside
of the workbench, in the <statementSet> tag of the statement set
in which an edit occurs set the value of the configureStatus attribute
to REQUIRED, like this: configureStatus="REQUIRED" Then,
run the Configure utility on the file.
- Find the opening <statementSet> tag for one of the statement
sets that you do not want the Configure utility to change.
- In this tag, change the value of the configureStatus attribute
to FINAL.
Attention: If
you delete the value of the name attribute in the
opening <package> tag after the <statementSet> tag, the Configure
utility ignores the value FINAL in the configureStatus attribute
of the <statementSet> tag. Before you can run the StaticBinder
utility on a pureQueryXML file, all name attributes
in <package> tags must have values. The StaticBinder utility uses
these values for the names of the DB2 packages
that it creates. So, if a name attribute lacks
a value, the Configure utility considers the corresponding statement
set to be unfinished.
- Repeat steps 2 and 3 for each statement set that you do
not want the Configure utility to change.
- Save and close the file.
Results
When you run the Configure utility on the file, it validates
the statement sets for which the value of the configureStatus attribute
is FINAL and it reports errors. Some possible errors
include package names not being unique within the file, duplicate
cursors being created by queries in the file, and statements that
refer to cursors not being together in the same package with the queries
that create those cursors.