Menu

Building the QueryTool

Database (3)
rwaury

The QueryTool can be run either locally on IBM i or access DB2 for i databases remotely.


Windows

For the QueryTool to allow remote access it needs to be linked with IBM's XDA library available here.

The makefile provided was tested with Visual Studio 2010 but should also work with older versions.

The makefile defines two directories the user has to specify.

IBMINCDIR is the directory containing the XDA headers (default "C:\Program Files (x86)\IBM\Client Access\Toolkit\Include").

IBMLIBDIR is the directory containing the XDA libraries (default "C:\Program Files (x86)\IBM\Client Access\Toolkit\Lib").

The example below shows how to execute the makefile and build the tool.

> cd <VCInstallDir>\bin
> vcvars32
> nmake -f QueryTool.mak

IBM i

To build the QueryTool for IBM i copy the directory with the TSAR source and makefiles to an IFS diretory.

On the machine you want to build on create a physical file for the makefile

e.g. CRTSRCPF FILE(QGPL/MAKEFILE) RCDLEN(133).

Create a CL program from the makefile

e.g. CRTCLPGM PGM(QGPL/MAKEQTOOL) SRCFILE(QGPL/MAKEFILE).

Navigate to the IFS directory with TSAR directory (CD DIR('<ifs source="" file="" root="">')</ifs>).

execute the makefile (CALL MAKEQTOOL).

The program object (QUERYTOOL) will be created in the QGPL library per default.

This can be changed by setting the PGMLIB variable in the makefile to the preferred library.

The QueryTool can be executed with CALL QUERYTOOL.


Related

Wiki: Home

MongoDB Logo MongoDB