The KICKS KooKbooK is a newsletter of tasty recipes to help you get the most from KICKS. Got your own recipe you’d like to share? Send it to mikenoel137@gmail.com

Today's recipe - Using DB2 with KICKS

KICKS is an ordinary TSO/batch application and as such can be used with most of the tools you would use with any other TSO or batch application - including database products. This recipe focuses on using KICKS with DB2 (in Z/OS of course, since DB2 doesn't run in turnkey MVS).

Most of the 'Murach' example programs are preinstalled with KICKS, but the DB2 example (program DB2INQ1) is not. Let's see how to install and run it!

The first step in installing a system into KICKS is to generate the maps. This system has only one, DB2SET1, and it is already compiled, so the binary map is in the KIKRPL library and the symbolic map is in the COBCOPY library. If you look at the COBOL source (in the CB2 library) you will see it doesn't copy DB2SET1 but instead copies DB2SET1X. That's because DB2SET1X is a programmer generated version of the symbolic map, used instead of the version generated by the KICKS map generator.

The second step in installing a system into KICKS is to compile the programs. This system has only one, DB2INQ1, which is NOT compiled. The usual procedure to compile a KICKS program is to run the KIKCB2PP proc on it, which runs the KICKS preprocessor, the COBOL compiler, and the LINKER to produce an executable copy of the program in the KIKRPL library. But for a program that uses DB2 there are a few more steps.

 

The Short version of  "How to do it"

Do exactly like any other DB2 application, but

 

The Long version of  "How to do it"

  1. do over "· Run the KICKS preprocessor and save result for DB2I", then
  2. do over "· Run DB2I, produce plan, bind it, and produce program object module in KIKRPL", then
  3. do over "· Relink object module with 24 bit glue to 31 bit CAF".
  4. Finally run this bullet over again to get the SQLCODE for the problem, to wit:

Start KICKS one more time, enter the DIN1 transaction, and enter a customer number you know is present in the CUST table (like 400003) and press enter. This time you'll see

Success!! 

 

A closing note

This version of KICKS doesn't really support or utilize DB2 any more than it supports or utilizes LE. What it does is more like 'toleration'. It blindly stays out of their way, doing just what they minimally require, and nothing they can't themselves tolerate.

This is a GOOD thing. It means you can use DB2 with KICKS not because KICKS has special hooks to allow it, but because KICKS's standards compliance means it will work with other z/OS tools that  also use standard interfaces. You should have an easy time using KICKS with other major database products like Oracle, IDMS, Datacom and ADABAS !