Monday, September 21, 2015

More proof that RPGIII is done

cpf6301 odt

On Friday I was asked if I could help with a compilation error for a RPGIII program. When the source was compiled it produced a CPF6301 message, see below, and the programmer could not understand what it meant or how to fix it.

  Message . . . . : Program PGM1 in library LIB1 is not created as
  CPF6301 received.
  Cause . . . . . : Compile terminated in phase QRGRT at MI instruction 
  number '00000'X with message CPF6301. Text for message is: ERROR IN 

After a quick search I found that this has been happening in every release since V5R3. The problem occurs when additional code is added to very large RPG (RPGIII) source members, the compiler cannot create a new program as it out of available Object Definition Table entries.

IBM defines a Object Definition Table, ODT, as:

A table built at compile time by the system to keep track of objects declared in the program. The program objects in the table include variables, constants, labels, operand lists and exception descriptions. The table resides in the compiled program object.

Two solutions are offered:

  1. Split the RPGIII program into smaller programs.
  2. Convert source code to RPGLE (RPGIV), which is not affected by the ODT limit.

As no PTF is offered and the easier, best, solution is to convert the code to RPGLE, should reinforce to all of us that RPGIII is dead!

Unfortunately the person who brought this to my attention does not get it. He is breaking his monolith RPGIII source member into smaller ones, spending many hours to make his members small enough that this error will not occur. In my opinion the preferred solution is that he could spend just a few minutes to convert the source to RPGLE.

If you are not familiar with IBM's tool for converting RPGIII to RPGLE you should read RPGIII let it rest in peace. I am not saying you have to change all RPGIII source members to RPGLE now. Whenever you need to change a RPGIII program convert it to RPGLE and then make your change. Your future self will thank you for learning RPGLE, and not being a RPGIII Luddite.

You can learn more about the solution for this error from IBM's website here.


  1. This is not some new "bug" that has been introduced recently; this is a design limitation of the OPM MI instruction stream that is generated by all of the OPM compilers (RPG/400, COBOL/400, etc.)

    So, the person must have had a very large program and added a few lines of code, or perhaps it used an externally described FILE that now has many more fields than the last time it was compiled.

    OPM RPG/400 has not been enhanced since V2R3, so it is, in effect, "frozen" as are all OPM compilers. The IBM stated direction is ILE, and of course IBM is busy enhancing ILE RPG IV quite often lately.

    I concur that just using CVTRPGSRC and recompiling is probably a much easier solution.

  2. I definitely agree with this - "Whenever you need to change a RPGIII program convert it to RPGLE and then make your change." Even someone who's always worked in RPG III should be able to easily read the converted program.


To prevent "comment spam" all comments are moderated.
Learn about this website's comments policy here.

Some people have reported that they cannot post a comment using certain computers and browsers. If this is you feel free to use the Contact Form to send me the comment and I will post it for you, please include the title of the post so I know which one to post the comment to.