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

Can anyone explain me CALL procedure in COBOL.Does it carries similarities like call by reference in C.

1 Answers  


How many times the loop runs here 01 a pic 9(2) value 10. perform para1 a times stop run. para1: move 20 to a.

3 Answers  


What is Pic 9v99 Indicates in COBOL?

0 Answers   SwanSoft Technologies,


How many times the loop runs here 01 a pic 9(2) value 1. perform para1 until a=10 move 1 to a. stop run. para1: move 10 to a.

5 Answers  


can i use multiple when statements in search & search all ? justify ur answer?

2 Answers  






How can we know that cobol program is using report file or simple file....?

4 Answers  


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

0 Answers  


. How do we cast a variable in COBOL

1 Answers   HSBC,


how to display comp3 variables reply soon ?

4 Answers   Patni,


Why occurs cannot be used in 01 level in COBOL?

0 Answers   Arigo Infotech,


input:- A 10 20 30 40 B 5 7 10 14 C 8 12 14 16.... output:- A = 100,B=36,C=50. Here spaces are considered between numbers. When we give input as above, the numbers should be added n displayed.So please help me out.

4 Answers  


I have a cobol program with a sub program. How ca i find that it is a dynamic call? or static call..?

3 Answers   HCL, IBM,


Categories