|
|
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:
command | stmf format | PC program |
DB2CSV | .csv | Excel |
DB2HTML | .html | Internet browser |
DB2TXT | .txt | Notepad |
DB2XML | .xml | Internet 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. |
|
|
|
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:
- 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.
- 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
|
|
|
|