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

How does IDMS insure data integrity?

1 Answers  


i declare a Table as OCCURS 2000 TIMES.If the input file has more than 2000 records will the COBOL program fail?

12 Answers  


How can you declare the file ?

1 Answers   Wipro,


What guidelines should be followed to write a structured cobol prgm?

0 Answers  


A LESS 1200 IF B GREATER 25 MOVE 47 TOC ELSE MOVE 57 TO C IF A GREATER 249 MOVE 67 TO C ELSE NEXT SENTENCE ELSE IF B LESS 67 MOVE 27 TO C What will be the value of C, when A is 137 and b is 25

3 Answers   TCS,






In CICS/VSAM every file that is accessed should be defined in FCT. we have CICS READ, WRITE, BROWSE commands for VSAM files. How does it work with DB2 tables. It know it has to do with the plan. Please expain with examples.

1 Answers  


how we rectify soc4 and soc7 error in project(need real time answer)? please reply

3 Answers   HCL, Wipro,


In an EVALUTE statement is the order of the WHEN clauses significant?

4 Answers  


what is the advantage of using redefines instead of delaring the variables ?

5 Answers   HCL,


What is the difference beetween Arrays and Tables in Cobol? please dont give the answer that arrays in cobol terminology is called tables......

3 Answers   BirlaSoft,


what is Pic 9v99 Indicates?

2 Answers  


77 a pic x(4) value '1234' -----> instead of this 'abcd' 77 b pic 9(4) value zeros. move a to b what is the answers for both cases? IS it possible? Give me elementary move rules briefly......

8 Answers  


Categories