
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?
For example:
Can we
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.
Click the +1 button below to share it with your friends and colleagues
Share this if you liked it!
it is possible