ILE COBOL Programmer's Guide

Reading Syntax Diagrams

Throughout this book, syntax is described using the structure defined below.

The following example shows how the syntax is used:

Format
 
             (1)                  (2)
>>-STATEMENT-------+-identifier-1------+------------------------>
                   '-literal-1---------'
 
   .---------------------.
   V                     |
>----+-----------------+-+-------------------------------------->
     |            (3)  |
     '-| item 1 |------'
 
   .------------------------------------.
   V                               (4)  |
>----TO--identifier-m--+---------+------+----------------------->
                       '-ROUNDED-'
 
                                                  (5)
>--+--------------------------------------------+--------------->
   '-+----+--SIZE ERROR--imperative-statement-m-'
     '-ON-'
 
                     (6)
>--+---------------+-------------------------------------------><
   '-END-STATEMENT-'
 
item 1:
 
|--+-identifier-2------------+----------------------------------|
   +-literal-2---------------+
   '-arithmetic-expression-1-'
 
 

Notes:

  1. The STATEMENT key word must be specified and coded as shown.

  2. This operand is required. Either identifier-1 or literal-1 must be coded.

  3. The item 1 fragment is optional; it can be coded or not, as required by the application. If item 1 is coded, it can be repeated with each entry separated by one or more COBOL separators. Entry selections allowed for this fragment are described at the bottom of the diagram.

  4. The operand identifier-m and associated TO key word are required and can be repeated with one or more COBOL separators separating each entry. Each entry can be assigned the key word ROUNDED.

  5. The ON SIZE ERROR phrase with associated imperative-statement-m are optional. If the ON SIZE ERROR phrase is coded, the key word ON is optional.

  6. The END-STATEMENT key word can be coded to end the statement. It is not a required delimiter.


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