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 to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
What is the difference between subscript and index?
TO abend the data sholud open in which mode? 1.new 2.old 3.mod 4.shr
What is the difference between PIC 9.99 and PIC9v99?
i want to store 20 digits . h will u do it in cobol ?
Is It Possible to Update or change in VIEW Mode?
study the data discriptions and answer the questions given below i)01 ORDER RECORD 05 OUT-HEADER PIC X(50) 05 ITEM-COUNT PIC 99 05 OUT-ITEM PIC X(20) OCCURS 1 TO 20 DEPENDING ON ITEM-COUNT ii)01 NAME-AND-ADDRESS 05 N-AND-A-LINE OCCURES 5 05 LINE-LENGTH PIC P9 05 N-AND-A-CHAR PIC X OCCURS 1 TO 20 DEPENDING ON LINE-LENGTH iii)01 SALES-LIST 05 SALESMAN-COUNT PIC 99 05 SALES PIC 9(6) OCCURS 1 TO 100 DEPENDING ON SALESMAN-COUNT iv)01 ORDER-RECORD 05 NO-OF-BRANDS PIC 99 05 BRAND-PURCHASED OCCURS 1 TO 15 DEPENDING ON NO-OF-BRANDS which of the following is true? a.i) and iii) are valid b.i) and iv) are valid c.i) and iii) are not valid d.all are valid
What is 77 level used for ?
why we are using set in searchall?
What is the difference between external and global variables in COBOL?
What is the default value of DISP for temp datasets
Can we change the password using ALTER? anyone tried and changed?