IBM Support

Message CPF6301 When Compiling OPM RPG/400

Troubleshooting


Problem

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

Resolving The Problem

Compilation of an OPM RPG program failing 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 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:
1 Split up the OPM RPG program into two or more smaller programs.
2 Convert source code to ILE RPG, which is not affected by the ODT limit. The command CVTRPGSRC can 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 document 683175, Message 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"},"ARM Category":[{"code":"a8m0z0000000CHtAAM","label":"Programming ILE Languages"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Historical Number

17712827

Document Information

Modified date:
27 February 2023

UID

nas8N1019604