Compiler error CPF6301 when compiling I/O Module (IRP with errors)
|Product/Release:||LANSA for the AS/400|
|Abstract:||CPF6301 error is issued by the RPG compiler even when there are no errors in the compilation's Message Summary|
|Submitted By:||LANSA Technical Support|
Error CPF6301 reads:
Intermediate Representation of Program (IRP) contains x errors. Probable compiler error.
- The error is not related to any particular version of LANSA/AD, OS/400 or RPG compiler. It has occurred in LANSA for the AS/400 R6 G9, R6.5, and R7.0; in OS/400 V2R3, V3R1 and V3R6 (ie CISC and RISC systems).
- The CPF6301 error message is misleading. The IRP conversion should detect and be more specific about the cause of the problem.
- The error is caused by the size of the generated RPG program and, usually, by the number of files defined in the RPG program.
The following factors:
- Number of logical files
- Number of fields in a logical files
- Options in the DC@A01 and DC@OSVEROP data areas affect the size of the generated I/O module RPG source and they have produced CPF6301 errors.
To avoid this error reduce the size of the I/O module. The most effective ways to do this are:
- Reduce the number of logical files. This used to be the most effective option. Try to reuse the existing logicals or use Open Query files instead. In the documentation it is recommended not to define more than 10 or 15 logicals into LANSA (this does not mean that, in the case of OTHER files, the logical files not defined are going to be deleted. They are simply not going to be used from LANSA).
- If possible, define less key fields in the logicals. This also reduces the number of sub-routines (eg to cater for the Generic option when retrieving records).
Please contact LANSA Technical Support for further details.