 
 
 
 
 
 
 


 
 
 
 
 
 


 
The DIVIDE statement divides one numeric data item into or by other(s) and sets the values of data items equal to the quotient and remainder.
    ___ Format 1 ___________________________________________________________ 
   |                                                                        |
   |                                     <___________________________       |
   | >>__DIVIDE__ _identifier-1_ __INTO____identifier-2__ _________ _|____> |
   |             |_literal-1____|                        |_ROUNDED_|        |
   |                                                                        |
   | >__ ____________________________________________ ____________________> |
   |    |_ ____ __SIZE ERROR__imperative-statement-1_|                      |
   |      |_ON_|                                                            |
   |                                                                        |
   | >__ _________________________________________________ _______________> |
   |    |_NOT__ ____ __SIZE ERROR__imperative-statement-2_|                 |
   |           |_ON_|                                                       |
   |                                                                        |
   | >__ ____________ ___________________________________________________>< |
   |    |_END-DIVIDE_|                                                      |
   |                                                                        |
   |________________________________________________________________________|
   In Format 1, the value of identifier-1 or literal-1 is divided into the
   value of identifier-2, and the quotient is then stored in identifier-2.
   For each successive occurrence of identifier-2, the division takes place
   in the left-to-right order in which identifier-2 is specified.
    ___ Format 2 ___________________________________________________________ 
   |                                                                        |
   | >>__DIVIDE__ _identifier-1_ __INTO__ _identifier-2_ _________________> |
   |             |_literal-1____|        |_literal-2____|                   |
   |                                                                        |
   |            <___________________________                                |
   | >__GIVING____identifier-3__ _________ _|_____________________________> |
   |                            |_ROUNDED_|                                 |
   |                                                                        |
   | >__ ____________________________________________ ____________________> |
   |    |_ ____ __SIZE ERROR__imperative-statement-1_|                      |
   |      |_ON_|                                                            |
   |                                                                        |
   | >__ _________________________________________________ _______________> |
   |    |_NOT__ ____ __SIZE ERROR__imperative-statement-2_|                 |
   |           |_ON_|                                                       |
   |                                                                        |
   | >__ ____________ ___________________________________________________>< |
   |    |_END-DIVIDE_|                                                      |
   |                                                                        |
   |________________________________________________________________________|
   In Format 2, the value of identifier-1 or literal-1 is divided into the
   value of identifier-2 or literal-2.  The value of the quotient is stored
   in each data item referenced by identifier-3.
    ___ Format 3 ___________________________________________________________ 
   |                                                                        |
   | >>__DIVIDE__ _identifier-1_ __BY__ _identifier-2_ ___________________> |
   |             |_literal-1____|      |_literal-2____|                     |
   |                                                                        |
   |            <___________________________                                |
   | >__GIVING____identifier-3__ _________ _|_____________________________> |
   |                            |_ROUNDED_|                                 |
   |                                                                        |
   | >__ ____________________________________________ ____________________> |
   |    |_ ____ __SIZE ERROR__imperative-statement-1_|                      |
   |      |_ON_|                                                            |
   |                                                                        |
   | >__ _________________________________________________ _______________> |
   |    |_NOT__ ____ __SIZE ERROR__imperative-statement-2_|                 |
   |           |_ON_|                                                       |
   |                                                                        |
   | >__ ____________ ___________________________________________________>< |
   |    |_END-DIVIDE_|                                                      |
   |                                                                        |
   |________________________________________________________________________|
   In Format 3, the value of identifier-1 or literal-1 is divided by the
   value of identifier-2 or literal-2.  The value of the quotient is stored
   in each data item referenced by identifier-3.
    ___ Format 4 ___________________________________________________________ 
   |                                                                        |
   | >>__DIVIDE__ _identifier-1_ __INTO__ _identifier-2_ _________________> |
   |             |_literal-1____|        |_literal-2____|                   |
   |                                                                        |
   | >__GIVING__identifier-3__ _________ __REMAINDER__identifier-4________> |
   |                          |_ROUNDED_|                                   |
   |                                                                        |
   | >__ ____________________________________________ ____________________> |
   |    |_ ____ __SIZE ERROR__imperative-statement-1_|                      |
   |      |_ON_|                                                            |
   |                                                                        |
   | >__ _________________________________________________ _______________> |
   |    |_NOT__ ____ __SIZE ERROR__imperative-statement-2_|                 |
   |           |_ON_|                                                       |
   |                                                                        |
   | >__ ____________ ___________________________________________________>< |
   |    |_END-DIVIDE_|                                                      |
   |                                                                        |
   |________________________________________________________________________|
   In Format 4, the value of identifier-1 or literal-1 is divided into
   identifier-2 or literal-2.  The value of the quotient is stored in
   identifier-3, and the value of the remainder is stored in identifier-4.
    ___ Format 5 ___________________________________________________________ 
   |                                                                        |
   | >>__DIVIDE__ _identifier-1_ __BY__ _identifier-2_ ___________________> |
   |             |_literal-1____|      |_literal-2____|                     |
   |                                                                        |
   | >__GIVING__identifier-3__ _________ __REMAINDER__identifier-4________> |
   |                          |_ROUNDED_|                                   |
   |                                                                        |
   | >__ ____________________________________________ ____________________> |
   |    |_ ____ __SIZE ERROR__imperative-statement-1_|                      |
   |      |_ON_|                                                            |
   |                                                                        |
   | >__ _________________________________________________ _______________> |
   |    |_NOT__ ____ __SIZE ERROR__imperative-statement-2_|                 |
   |           |_ON_|                                                       |
   |                                                                        |
   | >__ ____________ ___________________________________________________>< |
   |    |_END-DIVIDE_|                                                      |
   |                                                                        |
   |________________________________________________________________________|
   In Format 5, the value of identifier-1 or literal-1 is divided by
   identifier-2 or literal-2.  The value of the quotient is stored in
   identifier-3, and the value of the remainder is stored in identifier-4.
For all Formats:
Subtopics:
 
 © Copyright IBM Corp. 1991, 1998
  © Copyright IBM Corp. 1991, 1998
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.