COBOL/400 Language Help

Format 4

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

Identifier-1 is the inspected item and must be an elementary or group item with USAGE DISPLAY.

identifier-2

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.

CHARACTERS

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.


[ Top of Page | Previous Page | Next Page | Table of Contents ]