Skip to content

Instantly share code, notes, and snippets.

@pdemby
Created November 4, 2014 14:39
Show Gist options
  • Save pdemby/bf9abe51d95e51f0782a to your computer and use it in GitHub Desktop.
Save pdemby/bf9abe51d95e51f0782a to your computer and use it in GitHub Desktop.
move-1
IDENTIFICATION DIVISION.
PROGRAM-ID. MoveNumbers.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 NUM-FIELD1 PIC 9(2).
02 NUM-FIELD2 PIC 9(2).
03 NUM-FIELD3 PIC 9(4).
04 NUM-FIELD4 PIC 9(4).
PROCEDURE DIVISION.
MOVE-ROUTINE.
MOVE 42 TO NUM-FIELD1.
MOVE NUM-FIELD1 TO NUM-FIELD2.
MOVE ZERO TO NUM-FIELD3.
MOVE NUM-FIELD2 TO NUM-FIELD4.
DISPLAY "NUM-FIELD1 = " NUM-FIELD1 "NUM-FIELD2 = " NUM-FIELD2
"NUM-FIELD3 = " NUM-FIELD3 "NUM-FIELD4 = " NUM-FIELD4.
STOP RUN.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment