Db2XTools  
by Antoon van Os

 
DB2 public source utility for IBM System i

The 2010 successor of the famous Db2XTool2.

 
   Convert database files to PC formats

Db2XTools is a Public Source utility written in ILE-RPG and ILE-CL, originated by Antoon van Os, Belgium.

This utility allows to convert a database file to an IFS stream file, in one of four PC formats.

Available PC formats and related PC programs:

commandstmf
format
PC
program
DB2CSV.csvExcel
DB2HTML.htmlInternet browser
DB2TXT.txtNotepad
DB2XML.xmlInternet browser
The above four commands can be executed:
  • in a terminal interactive session
  • in a batch job submitted by using paramete SBMJOB(*YES)
  • from a WEB page (as further explained).
   Prerequisites
  • OS/400 Release V6R1M0 or subsequent
  • System library QIWS (57xxSS1 option 12 - Host Services)
  • System library QSQL (Product number 57xxST1 option *BASE - DB2 Query Manager and SQL Development Kit)
  • System library QRPGLE (Product number 57xxWDS option 31 - Compiler - ILE RPG IV)
  • IBM System i Access for Windows (Client Access)

   Download
To download this utility, just press the "Download now" button.
Though everything is free, you must register.
download now
   Installation
  • unzip PC file Db2XTools.zip
  • transmit (binary) PC file Db2XTools.savf
    to IBM System i save file qgpl/Db2XTools
  • rstlib savlib(Db2XTools) dev(*savf) savf(qgpl/Db2XTools)
  • strrexprc srcmbr(install) srcfile(Db2XTools/qrexsrc)
   Operation from a black&green 5250 terminal
  • All commands feature help text.
  • The four conversion commands (Db2Csv, Db2Html, Db2Txt and Db2Xml) include a SHOW parameter. This parameter allows the converted stream file be displayed via the appropriate PC Windows utility. Operation requirements are detailed in the help text.
  • Command ChgShowDft allows to change the default value for the SHOW parameter in all the conversion commands.
   WEB interface
Db2XTools user interface is extremely simplified through a built-in WEB feature.
A simple URL, like http://.../db2xtools provides the entry to the WEB feature.
You then just type the name of the database file you care for and select the desired output format (txt, csv, html or xml). The result goes into a stream file and you can display it at the touch of a button.
To make it work, you have two choices:
  1. If you are NOT familiar with HTTP directives, you may easily create an HTTP istance to run Db2XTools from a given HTTP port.
    Just type command dspf '/db2xtools/conf/httpd.conf' and read the instructions.
  2. If you ARE familiar with HTTP directives, add the following directives to an HTTP instance of your choice:
    • for OS/400 before V7R2
      #---- DB2XTOOLS ----------------------------------------------------
      ScriptAliasMatch /db2xtoolsp/(.*)  /qsys.lib/db2xtools.lib/$1
      ScriptAliasMatch ^/db2xtools$  /qsys.lib/db2xtools.lib/db2xtools.pgm
      Alias /db2xtools/ /db2xtools/
      <Directory /db2xtools>
         Options None
         order allow,deny
         allow from all
      </Directory>                                                        
      <Directory /qsys.lib/db2xtools.lib>
         AllowOverride None
         order allow,deny
         allow from all
         Options -ExecCGI
         CGIConvMode %%EBCDIC/EBCDIC%%
      </Directory>
      <LocationMatch (^/db2xtoolsp/(.*)$|^/db2xtools$)>
         AuthType Basic
         AuthName "DB2XTOOLS utility"
         PasswdFile %%SYSTEM%%
         UserID %%CLIENT%%
         Require valid-user
      </LocationMatch>
    • for OS/400 V7R2 or subsequent
      #---- DB2XTOOLS ----------------------------------------------------
      ScriptAliasMatch /db2xtoolsp/(.*)  /qsys.lib/db2xtools.lib/$1
      ScriptAliasMatch ^/db2xtools$  /qsys.lib/db2xtools.lib/db2xtools.pgm
      Alias /db2xtools/ /db2xtools/
      <Directory /db2xtools>
         Options None
         Require all granted
      </Directory>
      <Directory /qsys.lib/db2xtools.lib>
         AllowOverride None
         Require all granted
         Options -ExecCGI
         CGIConvMode %%EBCDIC/EBCDIC%%
      </Directory>
      <LocationMatch (^/db2xtoolsp/(.*)$|^/db2xtools$)>
         AuthType Basic
         AuthName "DB2XTOOLS utility"
         PasswdFile %%SYSTEM%%
         UserID %%CLIENT%%
         Require valid-user
      </LocationMatch>
 
contact us contact us