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 |
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
What is the LINKAGE SECTION used for?
Discuss about changing dataset name in proc.
Write a program to explain size error.
how can we get current dat and time thru cobol pgm
explain sorting techniques in cobol program?
Minimum how many Number of Paragraphs are there in ID- Divison?
what is MSGLEVEL?
what is redefines? where it can be effectively use for the purpose of memory utilization? give an example?
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
How to convert bunch of words in a line to relvant ASCII values?