When an ILE C/C++ program that uses externally described files is compiled, the compiler extracts the record-level and field-level descriptions for the files referred to in the program and makes those descriptions part of the compiled program. When you run the program, you can verify that the descriptions with which the program was compiled are the current descriptions. This process is referred to as level checking.
When it creates the associated header file, the server assigns a unique level identifier for each record format. The following information determines the level identifier:
If you change any of the data description specification (DDS) items in the preceding list, the level identifier changes.
When you create or change files, and you specify that you want level checking:
If the changes affect a field that your program uses, you must compile the program again for it to run properly.
C++ users must use the GENCSRC utility for level checking.
C users can use either the GENCSRC utility or the #pragma mapinc
directive for level checking.
If you make changes that do not affect the fields that your program uses, you can run the program without compiling again by entering an override command for the file and specifying LVLCHK(*NO). For example, suppose that you add a field to the end of a record format in a database file, but the program does not use the new field. You can use the Override with Database File (OVRDBF) command with LVLCHK(*NO) to enable the program to run without compiling again.
The use of level checking ensures file integrity. It alerts you to the possibility of unpredictable results.
An alternative to level checking is to display and analyze the file description to determine if the changes affect your program. You can use the Display File Field Description (DSPFFD) command to display the description or, if you have the source entry utility (SEU), you can display the source file containing the DDS for the file. To display the format level identifier defined in the file, use the Display File Description (DSPFD) command.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.