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
Give some examples of command terminators?
What is length is cobol?
Which Search verb is equivalent to PERFORM…VARYING?
Which is not true about evaluate statement
) how do u code after getting data?
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 static and dynamic call in cobol?
HOw can I get the negative sign while deduct high value from low value
Which mode is used to operate the sequential file?
What is inspect in cobol ?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
How do you get the data to code the BMS macro?
What do you understand by psb and acb?
Explain about different table spaces.