SQL0199N error when trying to connect HammerDB to Db2 for z/OS

430 views Asked by At

I'm trying to generate some data for DB2 11.1 z/OS using HammerDB v3.1 which is running on a Windows remote host. There is no ability to run HammerDB on the same host with DB2. According to the HammerDB documentation I need to set up IBM Data Server Driver for ODBC and CLI.

What I did:

  1. Downloaded and set up the driver for 11.1 on HammerDB host - v11.1.4fp4_ntx64_odbc_cli.zip as described here

  2. Configure db2dsdriver.cfg file

<configuration>
   <dsncollection>
      <dsn alias="TPCC" name="<my database name>" host="<my host name>" port="50000"/>
      <!-- Long aliases are supported -->
      <dsn alias="longaliasname2" name="name2" host="server2.net1.com" port="55551">
         <parameter name="Authentication" value="SERVER_ENCRYPT"/>
      </dsn>
   </dsncollection>
   <databases>
      <database name="<my database name>" host="<my host name>" port="50000">
         <parameter name="CurrentSchema" value="OWNER1"/>
         .......
  1. Add environment variable DB2DSDRIVER_CFG_PATH

set DB2DSDRIVER_CFG_PATH=C:\ProgramData\IBM\DB2\C_IBMDB2_CLIDRIVER_clidriver\cfg

  1. Run HammerDB GUI, try to build a schema and receive
Error in Virtual User 1: [IBM][CLI Driver][DB2] SQL0199N  The use of the reserved word "INDEX" following "" is not valid.  Expected tokens may include:  "ORGANIZE APPEND VOLATILE AUDIT VALIDPROC EDITPROC OBID IN DATA".  SQLSTATE=42601```



1

There are 1 answers

0
Mark Barinstein On BEST ANSWER

Probably the easiest way to understand the root cause of the problem is to trace the CLI driver.
Tracing the CLI driver by using the db2trc on -cli command
Something like this on the DB2 Data Server Client side:

db2trc on -cli -f trc.dmp
steps to reproduce the problem
db2trc off
db2trc fmt -cli trc.dmp trc.dmp.txt

The trc.dmp.txt file will have exact statements the client tried to run.