Format 4 (INSPECT/CONVERTING) ->->-INSPECT identifier-1 CONVERTING-*identifier-6-*-------> *-literal-4---* *----------* V + ->----TO----*-identifier-7-*-*----------*-----------------><- *-literal-5----* *-phrase-1-* where phrase-1 is: ->->-*-BEFORE-*---*---------*---*-identifier-4-*-----><- *-AFTER--* *-INITIAL-* *-literal-2----*
Identifier-1 is the inspected item and must be an elementary or group item with USAGE DISPLAY.
Identifier-2, the count field, must be an elementary numeric data item defined without the symbol P in its PICTURE character-string.
You must initialize identifier-2 before the INSPECT statement is performed.
If you specify CHARACTERS, the count field is increased by 1 for each character (including the space character) in the inspected item. Thus, execution of the INSPECT TALLYING statement increases the value in the count field by the number of characters in the inspected item.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.