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
Difference between cobol and cobol-ii?
What are the different rules of SORT operation?
What are the different rules for performing sort operation?
Which mode is used to operate the sequential file?
How many bytes S(8) comp field occupy and its maximum value?
What is the local-storage section?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
How do we get current date from system with century in COBOL?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
What the difference is between continue and next sentence?
Write down the divisions of cobol program?
how to access the file from prodution from changeman tool and to submit a file to production