Display Table Sample
The FTM SWIFT Display Table Sample is a command-line-oriented Java™ program that uses JDBC to access Db2® tables and sends SQL-Select statements to Db2. JDBC is the standard database interface for Java programs. You can supply parameters, such as the OU name in table names (for example, message audit table DNI_A_MSG_SYSOU), the schema name, or select criteria by passing them in the command line or by entering them interactively on the command line.
In addition to using simple SQL statements, you can control
the way output is transformed. The Display Table Sample allows you
to display BLOBs in various code pages. For example, you can display
columns containing BLOB information in one row with a particular code
page that is specified by another column in that row. Additionally,
you can request only subsets of column data to be processed. You can
do this by specifying:
- A byte or character offset, and optionally a maximum length
- A tag that identifies the beginning, and optionally the end of a substring
- Which SQL statement to use
- Which parameters to be replaced in the SQL statement
- Which columns are to be displayed
- How columns are to be formatted
$ java com.ibm.dni.sample.DisplayTable dnimsgaudit_time -db XXXXXXXX
FTM SWIFT sample program to display and export data from tables.
> specify the schema name (default 'DNI'): XXXXXXX
DNIInfo: equivalent to passing '-sn XXXXXXX' via command-line option
> specify the organizational unit (default 'SYSOU'):
DNIInfo: equivalent to passing '-ou SYSOU' via command-line option
DNIInfo: Using SQL statement 'SELECT * FROM XXXXXXX.DNI_A_MSG_SYSOU'
Row: 1
AM_USER_ID: UA11
AM_OU_NAME: SYSOU
AM_BODY : <Message><DNI_SAMPLE><Request><UseAccessControl>No
: </UseAccessControl><UseWarehouse>No</UseWarehouse></Request>
: </DNI_SAMPLE></Message>
...
DNIInfo: Export complete. The Display Table Sample
provides Java source code for
the sample program and three definition files for working with
FTM SWIFT database tables. - DisplayTable.java
- Java source code for the sample program. This code can be compiled.
- dnimsgaudit_time
- Definition file to display entries contained in the message audit tables. Provide two database timestamps to limit the query.
- dniusraudit_user
- Definition file to display entries contained in the user audit tables. Provide a user ID for which you want to see the content.
- dnimwh_time
- Definition file to display entries contained in the message warehouse tables. Provide two database timestamps to limit the query.