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 maximum length of a field you can define using COMP-3 in COBOL?
How do u initialize an array?
What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH PIC S9(4) or PIC S9 (4) COMP." any reason?.Please let me know any one... Cheers,Prasad
what is the default print format? in cobol
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
how many subpgms we can use in a main pgm ? how do u link sub pgm to main pgm ? how can i use the parameters declared in main pgm to sub pgm ?
how do you define single dimensional array and multidimensional array in your cobol?
file status 00 is checked after opening the file or reading the file
What is the problem of ordered sequential files access?
Read a flat file and write last but one (I have n records in a file I have to write n-1th) record in another flat file. Could you please provide me the code in COBOL?
how to move the records from file to array table. give with code example
can any one help -s806