Previous Topic: Program Layout

Next Topic: Coding Standards for Database Files

Coding for iSeries

If you have a requirement to maintain versions of the same application on iSeries, you should code to accommodate this requirement.

For this you will need to:

In general, it is easy to code DDS, RPG III and command source to be compatible on either machine, even in native mode. CL is more problematic. Most of the considerations are given in the IBM ‘Migration Manual’. The following specific tips may be useful.

DDS—Do not qualify names that appear in DDS, for instance with the DDS REF, PRINT, or MSGCON keywords. Do not even use *LIBL as the qualifier value.

Be consistent in your use of the following panel components:

RPG III—There are no significant constraints on coding RPG III so that it can be run on either machine. If you need to execute request strings dynamically, use QCAEXEC (which is present on both machines) rather than QCMDEXC, the iSeries native program.

Commands—Because of the slight differences between the OS/400 and CPF versions of CL, it is not always possible to design commands that are 100% compatible with both OS/400 and CPF.

For commands where such differences occur, you should:

Coding CL—You may use the presence or absence of the data area Q5728SS1 in QSYS to determine whether or not you are on iSeries (it only exists on iSeries). The result can be used to condition subsequent processing.