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 to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
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?
Write some characteristics of cobol as means of business language.
) How do u handle errors in BMS macro?
Are you comfortable in cobol or jcl?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is rmode(any) ?
how do you reference the printer file formats from cobol programs
Difference between array and sub-script ?
How to remove 2 duplicate records and copy only one using job control language?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
How you can characterize tables in cobol?
What is the difference between Global and External Variables?