MOVE numericdata from smaller sending size to larger receiving size

Program to MOVE the numeric data from smaller sending size to larger receiving size

IDENTIFICATION DIVISION.
PROGRAM-ID. PGM4.
AUTHOR. Indus Computer Services.
*WHEN THE RECIEVE SIZE IS GREATER.
*FILLED WITH ZERO IN LEFT FOR NUMERIC
*FILLED WITH ZERO IN RIGHT FOR DECIMAL
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 A PIC 999V999 VALUE 345.678.
77 B PIC 9999V9999 VALUE ZERO.
PROCEDURE DIVISION.

MOVE A TO B.
DISPLAY 'RECIEVE SIZE IS GREATER'.
DISPLAY 'FILLED WITH ZERO IN LEFT AND RIGHT : ' B.
STOP RUN.

0 comments:

Post a Comment