Q
Problem solve Get help with specific problems with your technologies, process and projects.

Dealing with an indicator problem

I have converted an RPG/400 finder program to an RPG4 profiled procedure. I have resolved all compile time errors, however a runtime error CPF5021 occurs (incorrect relative record number) when the subfile is loaded the first time, despite the fact that the relative record number is 1 and the subfile has been cleared before the write operation. Do you know what might be causing this and how I can resolve it?

Generally, this is probably an If the indicator for SFLCLR or SFLINZ is still set, you cannot write a record to the subfile. If the indicator for SFLDSP and/or SFLDSPCTL are set and the display file is set to DFRWRT(*NO) or FRCDTA is set, it could also cause this although it will usually just display the subfile to the workstation as it gets loaded.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.


This was last published in July 2002

Dig Deeper on iSeries ILE programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close