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 |
how can we fetch 3 records in cobol pgm any coding pls ?
hi, can you ppl tell me, how to check whether the rewrite we gave for the ksds file is successful or not in the program.? i gave rewrite, the rewrite code is executing and maxcc=0 but updation doenot happen in the file?
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
why 02 level number can't be use as a separate level number like 01 or 77 ?
What is Static,Dynamic linking ?
What do you feel makes a good program?
In a COBOL program, 2 tables TABLE1 and TABLE2 are defined that are indexed by INDEX1 and INDEX2 respectively. Can we use INDEX1 with TABLE2 and INDEX2 with TABLE1?
What are the divisions in a cobol program? Which one is the mandatory division among them?
what is level 66 means??
Why occurs can not be used in 01 level ?
how will u find out 3rd week's 2nd day using occurs ?
I got user abend U4038 while compiling my runjcl.. can anyone help me?