IBM Support

RPG Cafe: Troubleshooting storage corruption affecting files

General Page

Information about some compile-time and run-time environment variables to help determine where the internal storage for an RPG file is getting corrupted

You are in: RPG Cafe > Troubleshooting storage corruption affecting files

Short URL: http://ibm.biz/rpgcafe_troubleshooting_check_files

 

If you have encountered a situation where an RPG file operation fails with an unexpected error in an RPG runtime function in service program QRNXIO, you may have storage corruption of in the RPG module with the file operation.

In this case, it is the storage in your RPG module that has the module's information about the file.

The most common causes of storage corruption for the internal storage in your module are

  • Passing parameters that are shorter than the called program or procedure expects
  • A called program or procedure accessing a parameter incorrectly when it is defined with options *NOPASS or *VARSIZE.

 

If you can reproduce the storage corruption problem, follow these steps in attachment "About the QIBM_RPG_CHECK_FILES envvars.pdf" to recompile your program with special code to check the storage of your files before and after call operations, and a few other operations, to help you determine where the storage corruption is happening.

See the attachment "Demo for QIBM_RPG_CHECK_FILES envvars.pdf" for some sample code that demonstrates the check-files environment variables in action.

[{"Type":"MASTER","Line of Business":{"code":"LOB73","label":"Power TPS"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SS69QP","label":"Rational Development Studio for i"},"ARM Category":[],"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0;7.2.0;7.3.0;7.4.0;7.5.0;7.6.0"}]

Document Information

Modified date:
22 May 2026

UID

ibm17273537