Threading considerations

The RPG compiler used for OS/400 and i5/OS is part of the WebSphere Development Toolset and WebSphere Development Studio for iSeries and is known as the ILE RPG IV Compiler.

In general, RPG programs should not use the multi threaded service programs. Exceptions are RPG programs created using the ILE RPG IV Compiler, and containing the

THREAD(*SERIALIZE) keyword in the control specification. However, even though these programs are thread safe, careful consideration must be given to the overall application design, as

THREAD(*SERIALIZE) forces serialization of RPG procedures at the module level, and this may have an adverse affect on overall performance.

Where RPG programs are used as data-conversion exits, they must be made thread-safe, and should be recompiled using the version 4.4 ILE RPG compiler or above, with

THREAD(*SERIALIZE) specified in the control specification.

For further information about threading, see the iSeries WebSphere MQ Development Studio: ILE RPG Reference, and the iSeries WebSphere MQ Development Studio: ILE RPG Programmer's Guide.