cobol program alphanumeric data from larger sendingsize to smaller receiving size

Program to move the alphanumeric data from larger sending size to smaller receiving size
IDENTIFICATION DIVISION.
PROGRAM-ID. PGM7.
AUTHOR.xyz
*WHEN THE RECIEVE SIZE IS GREATER.
*SPACE FILLING OCCURS FROM THE RIGHT IN ALPHANUMERIC.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 A PIC X(5) VALUE 'HELLO'.
77 B PIC X(10) VALUE SPACES.
PROCEDURE DIVISION.

MOVE A TO B.
DISPLAY 'RECIEVE SIZE IS GREATER'.
DISPLAY 'SPACE FILLING OCCURS FROM THE RIGHT :' B B.
STOP RUN.

0 comments:

Post a Comment