June 2002

Question Paper of CS – 03 File Structure & Programming in COBOL of June 2002 from IGNOU

Time : 2 Hours

Maximum Marks : 60

1 (a) A library has two types of members : one is special and library staff and others are general members. The library keeps records of all its members in a single file. The only difference in the data of special and library staff and general members is that for special and library staff the date of joining as staff member is recorded, whereas for general members the date of membership and fee amount paid is recorded. Write a program in COBOL for printing the details of all its members.

(b) What is indexed sequential file organisation? Why is it needed? What are the COBOL verbs used for this organisation? Compare and contrast index sequential organisation to sequential file organisation.

(c) What is the purpose of LABEL RECORD statement in COBOL? Can this statement be omitted? Justify your answer. What is the purpose of level 77 in COBOL ? Exaplain with an example.

(d) What are the advantages of using PERFORM statements in COBOL? Describe with the help of examples.

(e) How can you find a value in a single dimensional array represented in COBOL?

2 A bank keeps the following master file for its customers:

account no. 9 digits
account holder�s name 50 characters
Date of opening of account 8 digits
Balance 10 digits

Key : Account no. Assume sorted order of the file and suitable file organisation. A transaction file of daily deposits is created for the bank, having the following format :

account no. 9 digits
amount 10 digits
account holder�s name 50 characters

Write a program in COBOL to update the master file from the transaction file. Please note that transaction file also contains account holder�s name which is also used for verification in addition to account no. In case an account no. is not found or there is missmatch in names then a suitable error message is produced. Make suitable assumptions, if any.

3 Write a program in COBOL to create a relative file from a disk file. The format of the disk file is as follows:

Student_enrolment_no 9 digits
name 30 characters
date of birth 8 characters
programme 20 characters

The relative key may be assumed to be the student_enrolment_no. Make suitable assumptions, if any.

4 Describe the following COBOL verbs with the help of one example each:
(a) MOVE with CORRESPONDING option
(b) INSPECT statement
(c) COMPUTE verb
(d) INVALID KEY clause
(e) Input/Output statements of COBOL

5 A university has two computer centers for its students. A student can take the membership of one or both the centers. The centers keeps a monthly record of usage of computers in the following format:

enrolment_no 9 digits
programme_code 3 characters
total hrs. used in the month 3 digits

Write a program in COBOL which takes the monthly record files for the month of May for both the centers and determines the total time used in that month by students in the centers.

Comments are closed.