DEC 2000

Question Paper of CS – 03 File Structure & Programming in COBOL of Dec 2000 from IGNOU

Time : 2 Hours

Maximum Marks : 60

1 (a) How is database approach different from the COBOL programming approach? In what situations is COBOL programming better than database system?

(b) What is the use of having four divisions of COBOL program? What is the need of each of these divisions?

(c) Compare and contrast the characters of indexed sequential file organisation with relative file organisation. What are the types of applications where relative file organisation may be preferred over indexed sequential organisation?

(d) Input errors are the cause of more programming problem than any to her type of error.� What programming constructs in COBOL may be used to identify input errors?

(e) How is table represented in COBOL? How is a value to be searched in this table? Explain with the help of an example.

(f) What is a size error? How can it be checked? Explain with the help of two examples.

2 Write a program in COBOL for creating an indexed master file for a software storehouse, which keeps the following files:

Software Stock file:

Software code : 8 characters
Number of copies available : 5 digits
Software description : 50 characters

Sales file:

Software code : 8 characters
Customer code : 8 characters
Customer name : 35 characters
No. of copies sold : 5 characters
Date of issue : 8 characters
The index master which needs to be created includes:
Software code : 8 characters
Software description : 50 characters
No. of copies left : 5 digits
after processing stock file with sales file

3 A departmental store had two branches. Both the branches keep information about the items using the following format:

Item File: (The file is not sorted)
Item Code : 5 characters
Item Name : 25 characters
Acquired Stock : 10 digits
Item Type : 1 character

Due to some reasons one of the department store branches was closed down. All the items of this branch were moved to other branches.

Write a program in COBOL to create a unified item file of the individual item files of the department store branches. Please note that both the department store branches were having few common items.

4 Write a program in COBOL to print the best performance of a salesperson from each zone using the following transaction:

SALES DATA: (Not sorted)

Zone number : 1 digits (only five zones to be assumed)
Salesperson name: 1 digits (only five salesperson in each zone)
Salesperson name: 25 characters
Amount of sales : 8 digits
Date of sales : 8 characters

Please note the following

� There are maximum 5 zones and 5 salespersons in each zone.
� Each salesperson may have made many sales.
� The records of transaction file are not in any order.
� The output needs to include the zone number and the salesperson number and name of the salesperson who had made the maximum sales in that zone.

5 Explain the following COBOL verbs with one example each:

(a) PEDEFINES clause
(b) PERFROM with VARYING stateme
nt (c) MOVE CORRESPONDING statement
(d) STRING statement
(e) GOTO statement

Comments are closed.