Explain complete concept of table handling in COBOL with an
example?

Answers were Sorted based on User's Feedback



Explain complete concept of table handling in COBOL with an example?..

Answer / sivakumar sekharannair

repeated occurance of a field in a file can be defined as a
table of occurance. for example the file has records of of
a student details. it has the following fields
student name
stud registration number
stud class
student mark1
student mark2
student mark3
student mark4
student mark5
first three fields will vary in number of bytes. but 4th to
8th fields will be having same number of bytes(same
information repeated). so when we usually define a layout
for the file we will follow the below mentioned layout.
01 stud-details.
05 stud-name pic x(20).
05 stud-reg-no pic 9(9).
05 stud-class pic 9(2).
05 stud-mark1 pic 9(3).
05 stud-mark2 pic 9(3).
05 stud-mark3 pic 9(3).
05 stud-mark4 pic 9(3).
05 stud-mark5 pic 9(3).

Here we can see that for marks we have five different
fields which is wastage of space. to prevent this there is
a concept called table . by this all the five marks field
can be defined using a single field.
01 stud-details.
05 stud-name pic x(20).
05 stud-reg-no pic 9(9).
05 stud-class pic 9(2).
05 stud-mark pic 9(3) occurs 5 times
occurs clause will occupy the value of stud-mark five times
which is equal to having the mark field defined five times.

Is This Answer Correct ?    69 Yes 4 No

Explain complete concept of table handling in COBOL with an example?..

Answer / villan

Cool explanation... Hats off....

Is This Answer Correct ?    28 Yes 3 No

Post New Answer

More COBOL Interview Questions

wht r the advantages of 77 level number ?

8 Answers   TCS,


Whtz the specialty of 77 level number ?

2 Answers   Infosys,


01 a pic s9(5) value '-12345' how it will be stored

7 Answers   ACS,


S9(5)V9(2) occupies how many bytes memory ?

6 Answers   Cap Gemini,


which is faster either static call or dynamic call ? and specify the reasons for it ? reply fast

1 Answers  






if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

0 Answers  


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

0 Answers   IBM,


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

0 Answers  


Q:what is the difference between the variable length and fixed lenght.how it varies in the cobol.

12 Answers   CTS, Wipro,


what is the difference b/w level no.01 & level no.77?

3 Answers   HCL,


What are the divisions in a cobol program?

1 Answers  


What is 88 level used for ?

2 Answers  


Categories