title: Divide verb in Cobol
body: <p>I have this odd output in the remainder part of the DIVIDE verb in COBOL.
  The goal is just to divide 213.20 by 10 then save-off the quotient to another variable as well as the remainder. I was expecting in the remainder part to have value of 3.2 but it just gave me 0. Please enlighten me.</p>
  
  <p>See code snippet below:</p>
  
  <pre><code>WORKING-STORAGE SECTION.
      01 VAR-A  PIC S9(09)V99 COMP-3 VALUE 213.20
      01 VAR-B  PIC S9(09)V99 COMP-3 VALUE 10.00
      01 VAR-C  PIC S9(09)V99 COMP-3 VALUE 0.
      01 VAR-D  PIC S9V99     COMP-3 VALUE 0.  
  
  PROCEDURE DIVISION.
  MAIN-PARAGRAPH.
      DIVIDE VAR-A
        BY VAR-B
        GIVING VAR-C
        REMAINDER VAR-D.
  
      DISPLAY 'VAR-A: 'VAR-A.
      DISPLAY 'VAR-B: 'VAR-B.
      DISPLAY 'VAR-C: 'VAR-C.
      DISPLAY 'VAR-D: 'VAR-D.
  ********************************************
  RESULTS:
  
  VAR-A: 00000021320
  VAR-B: 00000001000
  VAR-C: 00000002132
  VAR-D: 000
  </code></pre>