Hi,
Kindly lemme knw the output of below COBOL code;
01 A PIC 9 (10).
01 B REDEFINES A PIC X (10).
INITIALIZE A B.
MOVE 'TANMAY' TO B.
COMPUTE A = A + 1.
DISPLAY 'A = ' A.
DISPLAY 'B = ' B.
EXIT.
1. Yes, but should only do so when a data item has multiple definitions/uses. . .1. Can we redefine variables with different data types?
2. If yes then why can't we perform computation on it?