Syntax

Folgende Syntax wird für das INSPECT Statement erkannt:

Format 1: INSPECT statement with TALLYING phrase

>>-INSPECT--identifier-1--TALLYING------------------------------>

   .------------------------------------------------------------------------------------.   
   |                    .-------------------------------------------------------------. |   
   |                    |               .------------------.                          | |   
   V                    V               V                  |                          | |   
>----identifier-2--FOR----+-CHARACTERS----+--------------+-+------------------------+-+-+-><
                          |               '-| phrase 1 |-'                          |       
                          |              .----------------------------------------. |       
                          |              |                   .------------------. | |       
                          |              V                   V                  | | |       
                          '-+-ALL-----+----+-identifier-3-+----+--------------+-+-+-'       
                            '-LEADING-'    '-literal-1----'    '-| phrase 1 |-'             

<html><hr/></html>

Format 2: INSPECT statement with REPLACING phrase

>>-INSPECT--identifier-1--REPLACING----------------------------->

   .-----------------------------------------------------------------------------------.   
   |                                    .------------------.                           |   
   V                                    V                  |                           |   
>----+-CHARACTERS BY--+-identifier-5-+----+--------------+-+-------------------------+-+-><
     |                '-literal-3----'    '-| phrase 1 |-'                           |     
     |              .--------------------------------------------------------------. |     
     |              |                                         .------------------. | |     
     |              V                                         V                  | | |     
     '-+-ALL-----+----+-identifier-3-+--BY--+-identifier-5-+----+--------------+-+-+-'     
       +-LEADING-+    '-literal-1----'      '-literal-3----'    '-| phrase 1 |-'           
       '-FIRST---'                                                                         

<html><hr/></html>

Format 3: INSPECT statement with TALLYING and REPLACING phrases

>>-INSPECT--identifier-1--TALLYING------------------------------>

   .------------------------------------------------------------------------------------.   
   |                    .-------------------------------------------------------------. |   
   |                    |               .------------------.                          | |   
   V                    V               V                  |                          | |   
>----identifier-2--FOR----+-CHARACTERS----+--------------+-+------------------------+-+-+-->
                          |               '-| phrase 1 |-'                          |       
                          |              .----------------------------------------. |       
                          |              |                   .------------------. | |       
                          |              V                   V                  | | |       
                          '-+-ALL-----+----+-identifier-3-+----+--------------+-+-+-'       
                            '-LEADING-'    '-literal-1----'    '-| phrase 1 |-'             

>--REPLACING---------------------------------------------------->

   .-----------------------------------------------------------------------------------.   
   |                                    .------------------.                           |   
   V                                    V                  |                           |   
>----+-CHARACTERS BY--+-identifier-5-+----+--------------+-+-------------------------+-+-><
     |                '-literal-3----'    '-| phrase 1 |-'                           |     
     |              .--------------------------------------------------------------. |     
     |              |                                         .------------------. | |     
     |              V                                         V                  | | |     
     '-+-ALL-----+----+-identifier-3-+--BY--+-identifier-5-+----+--------------+-+-+-'     
       +-LEADING-+    '-literal-1----'      '-literal-3----'    '-| phrase 1 |-'           
       '-FIRST---'                                                                         

<html><hr/></html>

Format 4: INSPECT statement with CONVERTING phrase

>>-INSPECT--identifier-1--CONVERTING--+-identifier-6-+--TO------>
                                      '-literal-4----'       

>--+-identifier-7-+--------------------------------------------->
   '-literal-5----'   

   .-------------------------------------------.   
   V                                           |   
>----+-BEFORE-+--+---------+--+-identifier-4-+-+---------------><
     '-AFTER--'  '-INITIAL-'  '-literal-2----'     

phrase 1

|--+-BEFORE-+--+---------+--+-identifier-4-+--------------------|
   '-AFTER--'  '-INITIAL-'  '-literal-2----'