Cobol Question: Download Cobol PDF
Can I redefine an X(100) field with a field of X(200)?
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.
Previous Question | Next Question |
What do you do to resolve SOC-7 error? | What does EXIT do? |