04-12-2011
Software companies and end users
developed on the
This white paper will discuss how to migrate RPG or COBOL code, CL and DDS to Windows and to execute on MS SQL. AS/400 applications were generally written in RPG/400 and were subsequently developed in RPG ILE. The usual compiled environment of AS/400 applications also include CL and DDS.
In order to accomplish the goals discussed earlier in this paper, the code must be recompiled. In this instance, we are using the compilers available from Infinite Corporation. Infinite has developed a family of products named Infinite i. As part of this product family, there are several compilers that will provide for the recompilation of RPG.400, RPG ILE, COBOL/400 and COBOL ILE, CL and DDS source code. Once recompiled, this code will be executed as native object code for Windows Enterprise Server 2008 r2. This is a 64-bit environment.
This approach uses what you already have; proven AS 400 code and resources, and allows you to execute functionally rich applications on a lower-cost 21st century platform.
Using infinite i, end-users can combine all the ‘competitive edge’ benefits of Windows with the power and stability of their RPG or COBOL applications. Since the underlying code is the original, the skills required to maintain the core logic remain the same. In fact, this process maintains source code integrity and simply allows it to be distributed on open platforms.
For AS/400
To illustrate what infinite i can do we will look at how infinite i deals with re-hosting an AS/400 application to run on Windows.
The Challenge
Presented with the challenge of running an AS/400 application on Windows, the problem that first comes to mind is that of source language; how to find a way of compiling thousands of programs written in proprietary CL, RPG or COBOL on Windows? But, in fact, the language issues are only the small tip of a large iceberg.
An AS/400 comes with a standard, mature and sophisticated environment designed to meet the needs of commercial applications. i OS (OS/400) provides the fundamental services required by an application-service such as print spooling, message handling, batch job process and, of course, the database.
In contrast, the services provided by Windows are less complete and less rich and where an adequate service is provided, it is invariably different to the service on an AS/400 in some significant respect.
AS/400 applications depend on these services as much, if not more than, the CL, RPG and COBOL languages that are used to define the application algorithms. So, the most vital components of infinite i are not the language compilers but the Infinite Deployment Environment. This environment contains internal DLL’s holding a legion of function that map OS/400 services on to underlying Windows services and so provide an OS/400-like ‘shell’, in which application programs can execute.
In this paper we examine the Big Four Services:
- Job management
- Database access
- User interface
- Printing
And other service functions, to see how
infinite i enhances standard Windows architecture to implement OS/400
functionality.
We will then look at the process by which an iSeries application is built on Windows.
1. Job
Management
THE REHOSTING SUITE
1. Save Application On AS/400
Migrating an application to Infinite i is a straightforward procedure. The application needs to be saved on the AS/400 using SAVLIB to save all the application components (source and object) to save files. The save files are then transferred to Infinite i.
2. Load Application On Infinite i
Infinite i provides the command RSTAPP - Restore Application, to load the application components from the save files. This command:
- Restores
all the source files and members
The Infinite i command RUNBIF - Run Build Instructions, executes the build instructions that were generated by the load phase, by making calls to the appropriate 'create' commands (CRTPF, CRTRPGPGM, CRTBNDRPG etc). When this command has completed, all the source members should have been compiled and the application will be ready for testing.
Infinite i provides development tools to
allow changes to be made, built and tested.
The SEU,
ILE
RPG
RPG/400
SQL
RPG/400
COBOL/400
SQL
COBOL/400
CL/400
CMD/400
DDS/400
(pf, lf, dspf, prtf)
Development
Support
Programming
Development Manager (PDM)
Source
Entry Utility (SEU)
Debugging
Interface
w/ C language from within HLLs.
Database
Support
Database
Engine
Internal
DB2/400
Connectivity
w/ MS SQL Server
Connectivity
w/ MS SQL
Support
for Multiple Members
Support
for Multiple Formats
Joined
Files
OPNQRYF
Triggers
Commitment
Control
Query/400
DFU
(Data File Utility)
LAPIS
Job
Management
Batch
job processing
Job
Scheduling
Subsystems
Joblog
Job
Description
Data
Queues (DTAQ)
Data
Areas (DTAARA)
Message
Handling
User
Interface
“Work
With” panels
Menus
Command
prompts
Panel
Groups (PNLGRP)
Telnet
5250 Data Stream
User
profiles
Object
Management
Save
/ Restore
Printing
Spooling
Output
queues (OUTQ)
Spool
Writers (SPLWTR)
Local
and remote printing
Migration
Support
OS/400
API support
Most
common APIs
USRSPC
handling