58 Modernizing IBM Eserver iSeries Application Data Acess - A Roadmap Cornerstone
5.1 Introduction
The main goal of this stage is to minimize the impact of change on the business. This is
achieved in two ways:
򐂰 By de-coupling the database access from the application program.
򐂰 By utilizing SQL views as the only way to access the data. Adding new columns to the
database has no impact on existing views, thus eliminating the need to recreate the views
and supporting programs. These views can be accessed via service programs or directly
through ODBC or JDBC SQL statements.
The process involves a phased approach to replace native I/O operations with SQL data
access methods. The strategy of using I/O modules is to limit the SQL optimization
knowledge to the database programming group. This will allow the application programmers
to focus on solutions to business requirements without a need to understand the complexities
of database optimization.
The I/O module masks the complexity of the database from the application programmer. For
example, an HLL program may be performing several read operations to multiple files to fill a
subfile. This could be replaced by a single call to an I/O module that performs a single SQL
fetch operation to a join view and returns a single host array (multiple occurrence data
structure in RPG) to the caller.
In addition, the I/O module allows the database programmer to take advantage of database
functions (that is, date and time data types, variable length fields, identity columns, etc.), thus
eliminating many common HLL programming requirements. This includes programming
required to format date and time data, formatting address lines, etc. Figure 5-1 illustrates the
objective of this second stage.
Figure 5-1 Stage 2 - I/O modules to access SQL objects
The following is an overview of the steps required in this stage:
1. Establish naming conventions.
2. Create SQL views based on business requirements.
3. Create service programs to access data from the SQL views.
4. Convert selected legacy programs to use service programs.
Let us start explaining the different steps of this stage.
5.2 Establish naming conventions
One of the biggest issues in naming objects on the iSeries is the 10-character limitation of the
object name itself. Regardless of where the source resides you are still limited to 10
characters for the program and module objects. Because of the multitude of objects that can

Get Modernizing IBM eServer iSeries Application Data Access - A Roadmap Cornerstone now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.