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
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
Which Search verb is equivalent to PERFORM…VARYING?
Can you please let me know the centre name of INS certification in Kolkata.
how do you reference the variable unblock file formats from cobol programs
how can i see junk values in dclgen or in hostvariable of comp ?
how do you reference the rrds file formats from cobol programs
What is the compute verb? How is it used?
How many bytes S(8) comp field occupy and its maximum value?
What is comp-1 and comp-2?
Define cobol?
What are the access modes of START statement?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
how do you reference the ksds vsam file formats from cobol programs
Which is not true about evaluate statement
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?