CPF5272 - I/O error

By kimot, 22 May, 2023

If you get this message :

Message . . . . :   I/O error CPF5272 was detected in file XXXXXXXXX (C G D F).  
Cause . . . . . :   The RPG procedure YYYYYY in program ZZZZZZZ/JJJJJJJ        
  received the message CPF5272 at statement 055260 while performing I/O       
  operation WRITE on file XXXXXXXX.

You have probably set Access path size parameter on file to *MAX4GB.

You can change it to *MAX1TB (but there must be no locks on the object).

 

 

You can also check actual settings on other files in your libraries.

First run this SQL to collect information about object sizes in all user libraries on your system.

CREATE TABLE YourLibrary.FileName AS (SELECT OBJNAME, OBJLIB,
OBJTYPE, OBJCREATED, OBJSIZE FROM TABLE                    
(QSYS2.OBJECT_STATISTICS('*ALLUSR','*ALL')) X ) WITH DATA  

After this step you can list all files with *MAX4GB ordered by file size.

SELECT TABLE_SCHEMA, TABLE_NAME, OBJSIZE, NATIVE_TYPE, ACCESS_PATH_SIZE, ACCESS_PATH_KEYED, ACCESS_PATH_TYPE FROM QSYS2.SYSFILES
JOIN YourLibrary.FileName ON TABLE_SCHEMA = OBJLIB AND TABLE_NAME = OBJNAME
WHERE ACCESS_PATH_KEYED = 'YES' AND TABLE_SCHEMA = 'WhichUserLibraryToCheck' AND ACCESS_PATH_SIZE = '*MAX4GB'
ORDER BY OBJSIZE DESC;