From the fine manual:
identifier-2 Is the count field, and must be an elementary integer item defined without the symbol P in its PICTURE character-string. identifier-2 cannot be an external floating-point item. You must initialize identifier-2 before execution of the INSPECT statement begins.
Joined: 07 Aug 2006 Posts: 128 Location: kerala,india
The counter must be initialized because when each inspect takes place
the internal operation is
COUNT = COUNT + 1
ie when each character that we specified founds in the inspecting identifier the internal operation of count increment takes place
so if we left COUNTER uninitialized the calculation will result in abend because there may be some junk values in COUNTER that are not numeric