what is the difference between occurs and occurs depending
on? i dont think so there is the difference in
storage..then why we should use occurs depending on?
Answer Posted / venkat
when we define cobol table with OCCURS, it is of fixed
storage and length. The program execution will take the
total storage irrespective of utiliztaion. Where as table
degined with OCCURS DEPENDING ON provides flexibility to
the developers to choose length of table dynamically.
Length of below table is based on WS-OBJ value.
WS-SUB OCCURS 1 TO 5 TIMES DEPENDING ON WS-OBJ PIC X(2).
For example if you want to stoge employee detail in an
cobol table and you are not aware of number of employees at
the time of table declaration, you can use variable length
cobol table. During program execution based on number of
employees you can set the length of table
| Is This Answer Correct ? | 14 Yes | 5 No |
Post New Answer View All Answers
How do you get the data to code the BMS macro?
What is link edit in cobol?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
What are the cobol coding sheets?
How do you reference the following file formats from cobol programs?
how do you define single dimensional array and multidimensional array in your cobol?
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.
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
Can you please let me know the centre name of INS certification in Kolkata.
What are the different data types in cobol?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
) what is the difference between AID and HANDLE AID?
how do you reference the ksds vsam file formats from cobol programs
What is the difference between comp and comp-3?
What is a scope terminator give example?