16.10.2015 Views

Getting Startedwith pureQuery

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 8 – Extended Insight 149<br />

7.6.3 Specifying additional options<br />

You can customize the behavior of the StaticBinder utility by specifying additional options,<br />

either on the command line or in an options file. Specify -help to see a list of the<br />

available options. Refer to the IBM Optim <strong>pureQuery</strong> Runtime documentation for details<br />

about the many options that are available for the StaticBinder utility.<br />

You can specify the additional options either on the command line, or in the options file.<br />

When you specify an option both on the command line and in the options file, <strong>pureQuery</strong><br />

will use the value that is on the command line.<br />

7.6.4 Example commands for the StaticBinder utility<br />

The following listings provide several sample commands that you could use to run the<br />

StaticBinder utility. Remember that anytime you run the StaticBinder utility from the<br />

command line, you must have pdq.jar, pdqmgmt.jar, and the JAR files for the IBM<br />

Data Server Driver for JDBC and SQLJ in the classpath.<br />

Listing 7.16 shows an example of specifying database connection information and two<br />

interfaces on the command line. The utility binds each of the interfaces using the<br />

connection information.<br />

java com.ibm.pdq.tools.StaticBinder -url yourURL -username yourUsername -<br />

password yourPassword -interface myPackage1.MyInterface1<br />

myPackage2.MyInterface2<br />

Listing 7.16 - Example of running the StaticBinder utility while specifying two<br />

interfaces on the command line<br />

Listing 7.17 shows an example of specifying database connection information and two<br />

statement sets from a <strong>pureQuery</strong>Xml file on the command line. The utility binds the two<br />

statement sets using the connection information.<br />

java com.ibm.pdq.tools.StaticBinder -url yourURL -username yourUsername -<br />

password yourPassword -<strong>pureQuery</strong>Xml "C:\path\captureFile.pdqxml:MYPKGA"<br />

"C:\path\captureFile.pdqxml:MYPKGB"<br />

Listing 7.17 - Example of running the StaticBinder utility while specifying two<br />

statement sets from a <strong>pureQuery</strong>Xml file on the command line<br />

Listing 7.18 shows an example of specifying database connection information and an<br />

options file on the command line. The utility uses the connection information to bind all of<br />

the entries in the options file.<br />

java com.ibm.pdq.tools.StaticBinder -url yourURL -username yourUsername -<br />

password yourPassword -optionsFile "C:\path\Default.bindProps"<br />

Listing 7.18 - An example of running the StaticBinder utility while specifying<br />

database connection information and an options file on the command line<br />

Listing 7.19 shows an example of specifying an options file and an interface on the<br />

command line. The options file must contain the database connection information. The

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!