Is this allowed?
01 WS-TABLE.
03 FILLER-X PIC X(5) VALUE 'AAAAA'.
03 WS-EX REDEFINES FILLER-X OCCURS 5 TIMES PIC X(1).
can redefines clause be used with occurs clause?
Answers were Sorted based on User's Feedback
Answer / ankur
Yes. Redefines just causes both the fields to be started at
the same location. We can even redifine a A(100) with B
(200) and the other way round.
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / sandy
Bob, using occurs under redefines is also possible.
example.
01 WS-REF-TABLE.
05 WS-DATA1 PIC X(8) VALUE 'TEST '.
05 WS-DATA2 PIC X(8) VALUE 'COBOL '.
01 WS-RED-TABLE REDEFINES WS-REF-TABLE.
10 WS-RED-DATA OCCURS 2 TIMES PIC X(8).
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / bob
Yes we can use redefine under occurs clause but we cannot
use occurs under redefine
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / frankie
What is diff betn 'Occurs under Redefines' and the vice
versa?
Confused...Can you help?
Is This Answer Correct ? | 0 Yes | 0 No |
wht is the diff b/w if and evaluate stmts ?
How To move a value to an array using move verb?
How to define a array dynamically.....
what is a zoned decimal data type and how it will be stored?
Why we are using comp and comp-3 in real time projects?
Determine the total no of bytes in the following. 01 rec1. 02 a pic x(6) 02 b redefines a. 03 c occus 6 times pic 9. 02 d occurs 6 times pic 9. 03 e pic x(5) 03 f pic 999.
What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?
What was removed from COBOL in the COBOL II implementation?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2 times. My qustion is how can we access the second name
why do u need inspect verb?
comp-3 field occupy?