Can a REDEFINES clause be used along with an OCCURS clause?
if yes,
01 WS-TABLE.
03 WS-TABLE-EL OCCURS 5 TIMES PIC X(1) VALUE 'A'.
03 WS-EX REDEFINES WS-TABLE-EL PIC X(5). What can you
expect?
if no,why?
Answer Posted / anoop
It is possible to use redefine class along with OCCURS
class, but you cannot redefine a table directly. So the
above code wont work.
01 ws-table
03 ws-table-el redefines ws-ex occurs 5 times pic x(1).
This is valid one.
| Is This Answer Correct ? | 3 Yes | 7 No |
Post New Answer View All Answers
What rules are to be followed while using the corresponding options?
I have a File that has duplicate records. I need only those records that occur more than thrice.?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
In COBOL, what is the different between index and subscript?
What are various search techniques in cobol? Explain.
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
Write a cobol program making use of the redefine clause.
What is the difference between binary search and sequential search?
What are the different rules of SORT operation?
What is report-item in COBOL?
What is the utilization of copybook in cobol?
How do you differentiate between cobol and cobol-ii?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
i want a program using by if, evaluate , string, unstring, perform, occurs?
What is the difference between next sentence and continue in cobol programing language?