We have numerous programs on our system (iSeries...V5R2) that are SQLRPG. We recently changed one of the large physical files that one of the SQLRPG's run over. We changed the physical via a compile of the with LVLCHK *no. (fields added to the end of the file) We started to experience some issues with this one program (SQLRPG) in particular. We did a recompile of the program and the issue seemed to go away. I guess my question is that I was not aware that when using SQLRPG, and you do a file change LVLCHK *no, you would still need to do a recompile of the programs. Have anyone experienced or heard of this issue?
Software/Hardware used:
ASKED:
May 19, 2005 3:21 PM
UPDATED:
October 25, 2009 11:41 AM
I think that the concept of LVLCHK was the best thing that ever happened. I cringe at the thought that anyone would create a file with level check *no. The concepts prevents a programmer from shooting himself in the foot. Recompile the programs and you’ll sleep better at night.
Whether a change in the file layout will affect your program is dependent on the fields being selected or the structures they are placed into.
If you are using the existing file layout as an external data structure or you are otherwise bringing every field into the program, you will need to recompile.
If your SQL is using a specific subset of the already existing fields, the field definitions have not changed, and you have a static defined structure to receive them that does not rely on the file layout, the program should continue to work without a recompile.