Can we redefine a PIC X(100) item to X(200)?
I have seen this question in many interview dumps? can someone answer that is it possible to redefine a COBOL variable to a larger size?
10 VAR1 PIC X(100).
10 VAR2 REDEFINES VAR1 PIC X(200).
Is the above possible?
Some versions of some compilers will allow this with no problem.
Some will issue a Warning.
Some will raise an Error and the compile will fail.
Suggest one read the manual for the compiler and version being used.