COBOL/400 Language Help

Format 2 (SUBTRACT with GIVING)

Description
In Format 2 (SUBTRACT with GIVING), all identifiers or literals preceding the keyword FROM are added together and this sum is subtracted from identifier-2 or literal-2. The result of the subtraction is stored as the new value of each data item referenced by identifier-3.
Format 2 (SUBTRACT with GIVING)
 
             *--------------*
             V              +
->->--SUBTRACT-*-identifier-1-*FROM-*-identifier-2-*------->
             *-literal-1----*     *-literal-2----*
 
            *----------------------*
            V                      +
->--GIVING---identifier-3-*---------*--------------------->
                         *-ROUNDED-*
 
->--*------------------------------------------*---------->
   *-*----*-SIZE ERROR imperative-statement-1-*
     *-ON-*
 
->--*-----------------------------------------------*----->
   *-NOT--*----*-SIZE ERROR imperative-statement-2-*
          *-ON-*
 
->--*--------------*--------------------------------------><-
   *-END-SUBTRACT-*
 


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