Lerox DB/2 Database Dictionary in QlikView for IBM System AS/400

advertisement
Lerox DB/2 Database Dictionary in QlikView
for IBM System AS/400, iSeries i5, System i
Lerox DB/2 Database Dictionary in QlikView
for IBM System AS/400, iSeries i5, System i
Table of Contents
SUMMARY .........................................................................................................................................................................................................................................................3
CONTEXT OF THE APPLICATION .........................................................................................................................................................................................................................4
FUNCTIONALITY .................................................................................................................................................................................................................................................5
FUNCTIONAL DETAILS ........................................................................................................................................................................................................................................6
SAMPLE USE CASE 1 – IDENTIFY DIVERGENT FILE STRUCTURES .......................................................................................................................................................................10
SAMPLE USE CASE 2 – LOCATE TABLES CREATED BY SQL STATEMENTS............................................................................................................................................................11
SAMPLE USE CASE 3 – SEARCH FOR FIELD NAMES AND OBTAIN ADDITIONAL INFORMATION .........................................................................................................................13
CONTACT AND FURTHER INFORMATION .........................................................................................................................................................................................................14
Page 2 / 14
Lerox DB/2 Database Dictionary in QlikView
for IBM System AS/400, iSeries i5, System i
Summary
The Lerox DB/2 Database Dictionary for System AS/400, iSeries i5, System i is a QlikView application that provides easy structural
analysis of any DB/2 database on these systems. It can be used to locate data and create script snippets for the data modeling phase
of QlikView application design. Target groups are database administrators and QlikView application developers that require data from
DB/2 data sources for their analysis.
The application consists of two parts: The first file is connected directly to a DB/2 database. It is used to load the repository, transform
fields to show interconnections and save everything in a QlikView optimized file format. The second part provides an intuitive
QlikView user interface for analysis.
Installation only requires three steps: At first a user with sufficient reading rights to load all relevant data needs to be created on the
DB/2 system. Then an ODBC connection needs to be established and added to the load script of the DB/2 Database Dictionary.
Lerox has more than two decades of experience with DB/2 databases and started developing DB/2 analysis applications in QlikView
in 2003. The DB/2 Database Dictionary has been useful in client installations for many years.
Please contact Lerox Account Manager Markus Baumgartner at +43 676 740 7890 or markus.baumgartner@lerox.at for further
details.
Page 3 / 14
Lerox DB/2 Database Dictionary in QlikView
for IBM System AS/400, iSeries i5, System i
Context of the application
Throughout the years, IBM solutions have been using the integrated database called DB/2 for the operating systems OS/400 and
I5/OS later on. AS/400 used to be the name of the corresponding hardware for a long period of time and is still frequently used, even
when referring to the newer iSeries or System i.
Summary of IBM product names over the past decades
Page 4 / 14
Lerox DB/2 Database Dictionary in QlikView
for IBM System AS/400, iSeries i5, System i
Functionality
As most QlikView developers know, „sqltables“ is a very useful command for development. It is used to combine an array of fields
from an ODBC data source in tables. Together with fields generated by the commands “sqlcolumns” and “sqltypes” these fields show
structure and properties of a database.
In context of AS/400 systems this information is usually not sufficient as DB/2 is not an SQL database per-se - structure and
management are significantly different. Additional information regarding fields, their occurrence, access paths, etc. is required. At this
point the Lerox DB/2 Database Dictionary can be used in to provide simple access to the additionally required information.
The Database Dictionary itself consists of two QlikView applications. The data loader application determines and locates data in the
DB/2 repository and saves the information to QlikView optimized QVD files (i5_get_DB2_Repository_into_QVD.qvw). The data loader
also translates content of certain fields. The actual collection of data is determined by the ODBC connection, the overall number of
tables and the libraries where data tables are saved. For large, complex systems this automated process can take up to an hour.
A database user is required to connect the Database Dictionary application to the DB/2 database via ODBC. This user needs to be
able to read the libraries QSYS, QSYS2 and QUSRSYS, users in the class *PGMR usually have the appropriate rights.
As soon as QlikView optimized QVD files have been created by the first application of the Lerox Database Dictionary, the second
application (i5_display_DB-File-Field-Structure.qvw) can be used for in depth analysis as it allows direct access to the DB/2 database
repository and to additional Meta information. In addition QlikView Developers can easily run various queries on tables and fields.
They can also copy selected fields to their QlikView load scripts and correspondingly rename fields to self-explaining expressions (by
default the existing field text is used).
Page 5 / 14
Lerox DB/2 Database Dictionary in QlikView
for IBM System AS/400, iSeries i5, System i
Functional Details
Folder (Library) of tables
(Files)
Name of a table (file)
Record format (see below
for details)
Owner of the table (file)
Screenshot 1: Main screen of the analysis application of the database dictionary right after start
Page 6 / 14
Lerox DB/2 Database Dictionary in QlikView
for IBM System AS/400, iSeries i5, System i
Details on record format
Record formats are specific to the DB/2 for iBusiness. Groups can be created in database files (tables) that contain multiple fields.
This allows uniting multiple files (tables) in a logical view. In the conceptual view of the database design one example may be an
order head, order details and maybe an additional order free text that are joined via a common key like company or order number.
Standard QlikView cannot process such logical files as there are no equivalents for them in SQL.
Screenshot 2: Selection of a library (folder) and a file (table) to access additional details
Page 7 / 14
Lerox DB/2 Database Dictionary in QlikView
for IBM System AS/400, iSeries i5, System i
Screenshot 3 - Detail view on structure table: This example shows a file (table) with two key fields.
Screenshot 4 - Detail view on Meta information
File-Attr, PF, LF, TB, ID (Specific to DB/2 on AS/400): PF [Physical File (table)] and LF [Logical File]:
File D=Data, S=Source (Specific to DB/2 on AS/400): „D“ marks a file (table) that is managed by the DB/2 Database Management in
all instances (usually files that contain client data). „S“ marks a file (table) that is also managed by the DB/2 Database Management
but contains program code for application development.
Page 8 / 14
Lerox DB/2 Database Dictionary in QlikView
for IBM System AS/400, iSeries i5, System i
Screenshot 5 – Detail view: Mapping table for field name
conversion
Screenshot 4: Tab for display and export of QlikView script
snippets
When working with QlikView self-explaining field names are very important. Field names in DB/2 systems are very technical;
therefore the DB/2 Database Dictionary offers a mapping table and a script generator that translates DB/2 field names into selfexplaining names for use in the QlikView data model.
Page 9 / 14
Lerox DB/2 Database Dictionary in QlikView
for IBM System AS/400, iSeries i5, System i
Sample Use Case 1 – Identify divergent file structures
A search for the file “BUP” returned an
associative analysis showing that this
file exists in multiple libraries and that
there are multiple owners for the file.
Even more interesting is the fact that
the files (tables) have varying structures
(field structure) across libraries.
In a relational database something like
this should not happen. Still, in many
cases such a state cannot be entirely
eliminated in practice because of a
necessity for different development
versions, while a DB/2 repository
always manages and displays all files
(tables) of a system.
Page 10 / 14
Lerox DB/2 Database Dictionary in QlikView
for IBM System AS/400, iSeries i5, System i
Sample Use Case 2 – Locate tables created by SQL statements
DB/2 files (tables) that were created using SQL statements can easily be identified and selected using the file type box of the DB/2
database dictionary.
Currently the following selections are possible:
Index (SQL)
Objects created via create index
Logical File (DDS)
Objects created via DDS and the system command CRTLF
Physical File (DDS)
Objects created via DDS and the System command CRTPF
Remote File DDM
Objects created via System Commands (CRTDDMF)
Table (SQL)
Objects created via SQL create table
View (SQL)
Objects created via SQL create view
A counter next to the selection displays the total number of occurrences in a system. Data objects can be accessed directly via
further selection in “library” and/or „file“.
Page 11 / 14
Lerox DB/2 Database Dictionary in QlikView
for IBM System AS/400, iSeries i5, System i
In the following example, selection of file type “View” and table CHECK_CSTS returns that this file occurs in both the QSYS2 and
SYSIBM libraries.
Page 12 / 14
Lerox DB/2 Database Dictionary in QlikView
for IBM System AS/400, iSeries i5, System i
Sample Use Case 3 – Search for field names and obtain additional information
Another very common question
regarding DB/2 databases is where a
specific field name occurs. This can
be easily answered with the DB/2
Database Dictionary.
In this example the length of the field
OP#BU needs to be altered in the
database.
To locate all occurrences in the
database the field is selected in the
DB/2 Database dictionary.
The resulting associative analysis
offers a lot of useful information like
the total number of occurrences in
files (tables) or in which libraries
(folders) these tables are stored.
Also data type of a table (D/S) and
its owner can be easily identified.
Page 13 / 14
Lerox DB/2 Database Dictionary in QlikView
for IBM System AS/400, iSeries i5, System i
Contact and further Information
Lerox is a well-established IT solution provider with the largest dedicated QlikView team in Austria. The team is serving
customers in Austria and Germany with data analysis and QlikView since 2004. From the very beginning analysis for AS/400
systems (and predecessors) are one of the key specialties of the team.
Customers who are successfully using the DB/2 Database Dictionary include:
Please contact Lerox Account Manager Markus Baumgartner at +43 676 740 7890 or markus.baumgartner@lerox.at for further
details.
Page 14 / 14
Download