SQL access to RPG OPM database files

383 views Asked by At

I have to evaluate the legacy software used by a company my employer intends to buy. The software was originally programmed in RPG II (or III?) for IBM System/38 and been continuously expanded since. It now resides on a brand new i Series server with i5/OS and runtime environments for RPG II, III, IV/ILE. I'm not really worried about the software, but the data storage. I know that i5/OS includes a DB/2 relational database, but DB/2 only came to the midrange in the 1990ies. The software predates that by about a decade. System/38 featured an integrated database as well, but I could not find any details, or even the name.

The company resides in a heavily regulated business segment and I know for a fact that massive reporting changes are to be expected in the next three years. I would prefer to solve the reporting issues on a relational database since SQL experts are more readily available than RPG experts.

So I want to know:

  • Can I easily access legacy RPG II OPM traditional system database files via the integrated DB/2?
  • Do these database files show up automatically in the DB/2?
  • Do I need to "import" them in any way?
  • Do I need to change the software that creates/accesses them in any way to be able to use them from inside DB/2?
  • Or am I completely on the wrong track and the system works in a totally different way?

I don't want to replace the existing data storage method, I'm just looking for SQL based ways to access existing data periodically in a read-only/copy-to-report-database-cube fashion.

I browsed the IBM knowledge base and some redbooks, but neither "Modernizing IBM i Applications" nor "IBM i Database programming" were of much use in solving this question. All of the literature I found assumes detailed knowledge of the legacy systems and explains high-level language and SQL concepts, but none explains the legacy system in terms of a modern highlevel language & SQL view. So pointers to "RPG & i5/OS for the Internet Generation" would be highly appreciated, too.

1

There are 1 answers

4
David G On BEST ANSWER

On IBM i (formerly AS/400, System i, & iSeries), databases are databases. You can access them in just about any language regardless of how they were originally defined.

The database called 'DB2 for i' is the same basic database that was in the first release of the AS/400 (it's gotten faster, more efficient, gobs more features, etc., but the basic functionality is still the same).

You can access older style database files (physical & logical files) using SQL, and you can access SQL defined files using traditional RPG functions (chain, read, reade, etc). You may not be able to use some of the more advanced features, but the basic functionality will always be there.

IBM i biggest value proposition is backwards compatibility ... you can upgrade from one release to another and 99.9% of your application code will run unmodified (that .1% only applies if you try to do things that break the rules, few applications do that).