
INITCHECK
Use the INITCHECK
option to have the compiler
check for uninitialized data items and issue warning messages when
they are used without being initialized.
- Default
- INITCHECK=NO
- NO
- The compiler will not issue any warning messages for uninitialized data items.
- YES
- The compiler will check for uninitialized data items and issue
a warning message when a data item is used without being initialized.
However, if a data item is possibly initialized when it is used in
a statement, no warning message will be issued. Restrictions:
- The
INITCHECK
option analyzes data items in theWORKING-STORAGE SECTION
andLOCAL-STORAGE SECTION
only. In particular, it does not analyze data items in theLINKAGE SECTION
orFILE SECTION
. - The
INITCHECK
analysis does not track external or global data items. - The
INITCHECK
analysis does not track individual elements in tables independently. Instead, if one element of a table is initialized, all corresponding elements of the table are considered to be initialized. This applies to both fixed-length and variable-length tables. - The
INITCHECK
analysis does not track the initialization of items if it happens through a pointer. For example, if a pointer to an uninitialized data item is created by usingADDRESS-OF
, and that data item is initialized through that pointer, theINITCHECK
analysis might also issue a warning message. - For uninitialized data items being passed
BY REFERENCE
, no warning messages will be issued. However, theINITCHECK
analysis will warn about uninitialized data items being passedBY CONTENT
andBY VALUE
.
Notes:- All of the
INITCHECK
analyses occur at compile time only. - The
INITCHECK
option has no effect on the behavior or performance of the program after it has been compiled. Use of the
INITCHECK
option might increase compile time and memory consumption.
- The
