OS/VS COBOL Behavior vs. Enterprise
Posted: Tue Apr 20, 2010 11:39 pm
Seem to recall that one would get different behavior in this bit of code in OS/VS COBOL vs Enterprise. With Enterprise you get trailing zero in B. How about OS/VS? Anyone remember.
IDENTIFICATION DIVISION.
PROGRAM-ID. MOVETEST
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
*
01 A PIC X(3) VALUE '89 '.
01 B PIC 9(3).
PROCEDURE DIVISION.
MOVE A TO B.
DISPLAY B.
STOP RUN.
PROGRAM-ID. MOVETEST
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
*
01 A PIC X(3) VALUE '89 '.
01 B PIC 9(3).
PROCEDURE DIVISION.
MOVE A TO B.
DISPLAY B.
STOP RUN.