Cobol Question:
Download Questions PDF

Can I redefine an X(100) field with a field of X(200)?

Cobol Interview Question
Cobol Interview Question

Answer:

Yes. Redefines just causes both fields to start at the same location. For example: 01 WS-TOP PIC X(1) 01 WS-TOP-RED REDEFINES WS-TOP PIC X(2). If you MOVE ‘12' to WS-TOP-RED, DISPLAY WS-TOP will show 1 while DISPLAY WS-TOP-RED will show 12.

Download Cobol Interview Questions And Answers PDF

Previous QuestionNext Question
What do you do to resolve SOC-7 error?What does EXIT do?