Last active
August 29, 2015 14:08
-
-
Save pdemby/136d9415a872f1d20044 to your computer and use it in GitHub Desktop.
move-3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IDENTIFICATION DIVISION. | |
PROGRAM-ID. TruncateNumber. | |
DATA DIVISION. | |
WORKING-STORAGE SECTION. | |
01 BIG-NUMBER PIC 9(5).9(4). | |
01 LITTLE-NUMBER PIC 9(3).9(2). | |
PROCEDURE DIVISION. | |
TRUNCATE-ROUTINE. | |
MOVE 12345.6789 TO BIG-NUMBER. | |
MOVE BIG-NUMBER TO LITTLE-NUMBER. | |
DISPLAY "BIG-NUMBER = " BIG-NUMBER. | |
DISPLAY "LITTLE-NUMBER = " LITTLE-NUMBER. | |
STOP RUN. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment