IBM Support

Message CPF6301 When Compiling OPM RPG/400

Troubleshooting


Problem

Compilation of some OPM RPG programs fails with message CPF6301. This happens when an internal limit in the PRM (Program Resolution Monitor) is reached.

Resolving The Problem

Compilation of some OPM RPG programs fail with MESSAGE CPF6301. This happens when an internal limit in the PRM (Program Resolution Monitor) is reached. This limit restricts the number of objects (ODT entries) which can be defined in a program; such objects include variables and constants declared in the program, as well as any objects declared by the compiler for its own use. The maximum number of ODT entries is 32767. This explanation appears in APAR SA18115 (closed PRS).

Programs causing this compile-time failure are usually very large in terms of source code. A very common scenario is the following: an application developer extends an already large source member with new code to implement additional features; the compiler is unable to handle the new version of the program due to running out of ODT entries. There are two alternatives in such cases:

1Split up the OPM RPG program into two or more smaller programs.
2Convert source code to ILE RPG, which is not affected by the ODT limit. The command CVTRPGSRC may be used to convert from OPM RPG to ILE RPG, if required.
In a general sense, the CPF6301 error issued by the OPM RPG compiler is similar to the CPF6563 issued by the OPM COBOL compiler when attempting to compile excessively large programs. Refer to Rochester Support Center knowledgebase document N1010183, Messages Received When Program Is Too Large for Compilation of an OPM IBM COBOL/400 Program. To link to N1010183 immediately, click here .

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Historical Number

17712827

Document Information

Modified date:
18 December 2019

UID

nas8N1019604