Converting from RPGLE to DB2/400 SQL

SQL migration
My shop just announced that it intends to convert from RPGLE on the ISeries 400 platform, to SQL, such that the procedures will be portable to other hardware platforms. What documentation to I need to acquire to train on writing SQL procedures; initially within DB2/400?

Answer Wiki

Thanks. We'll let you know when a new response is added.

The starting place should the Information Center topic on Database Routines. The Related Information topic under Database lists numerous other resources.

One listed resource that you might find particularly useful is the Stored Procedures, Triggers, and User-Defined Functions on DB2 Universal Database for iSeries Redbook.

And, of course, the actual SQL Reference manuals will always be needed for reference about the SQL statements themselves. (They can be downloaded from the Information Center.)

However, since the purpose is “cross-platform compatibility”, you might want to be familiar with how other platforms do things. You won’t find a lot of IBM info on how to port from DB2 to other RDBMSs — you’ll have to go to other vendors to see what porting guides they offer. But maybe the IBM DB2 for i Porting Information page will be helpful. It can help with how to port specifications from some others to DB2, so you might be able to work out how to go in the opposite directions.


Discuss This Question: 3  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • philpl1jb
    My experience with Procedure/Java programming was very different from RPG. The basic construct is likely to be differet. Procedural environments, RPG, flow from task to task under program control. Web based systems are "session-less" requests for action. When the procedure receives the request it doesn't have a known past or known future, just a present. For instance you do not lock a record when fetching the data for display because you do not know what the next action will be. Requests from a single web session may be processed by different 400 jobs so the use of Qtemp, SETTING LIBRARY LISTS, ETC will only be reliable within the single call to the procedure. Next call my have a different processing job, different QTEMP, ETC. Phil
    54,090 pointsBadges:
  • cmorell44390
    My company is doing the same thing now, how did you do for this project ? Did you convert all programs by hand or did you automatized something ?
    10 pointsBadges:
  • TheRealRaven
    If the idea is to convert RPGLE to "portable SQL", you quite possibly have a long way to go. Embarking on what could easily be a multi-year, full-time project for your staff is quite a step. How familiar is the staff with SQL CLI coding?

    SQL CLI is essentially how business programming interacts with a database on platforms that do not feature an 'integrated database', so it's the direction your programming is likely to go.
    37,035 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: