June 1997

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

Time : 2 Hours

Maximum Marks : 60

1 (a) What is the purpose of Redefines clause in COBOL? Explain with the help of examples. Can this clause be used for defining variable length records?

(b) Explain with the help of examples, the purpose of Level 77 and level 88.

(c) Compare and contrast sequential file organisation with Relative file organisation. Suggest types of application where Relative file organisation will be preferred over sequential organisation.

(d) Explain the use of SEARCH statement in COBOL with the help of two examples.

(e) What is the purpose of STRING statement? Explain with the help of an example.

(f) How can you implement multidimensional array in COBOL? Explain with the help of an example.

2 XYZ Medical Store maintains a Medicine Status file. Size of this file is about 10,000 records, and the structure is:

Medicine Name : 25 Characters
Manufacture�s Name : 35 Characters
Quantity in stock : 10 Numeric digits
Date of expiry : 8 Characters
Medicine Code : 5 Numeric digits
Daily transactions for this store require about 100 records of master to be updated. Daily transactions are recorded in a transaction file of structure:
Medicine Code : 5 Numeric digits
Quantity ordered : 10 Numeric digits

Write a COBOL program to update the master file using the daily transaction file. master file that is Medicine Status file.

3 Explain the following COBOL verbs with the help of one example each:
(a) INSPECT statement
(b) START statement
(c) SYNCHROZED clause
(d) ADD statement with ROUNDED one ON SIZE ERROR option
(e) PERFROM statement with UNTIL and VARYING option

4 XYZ manufacturer has two production plants. These plants procedure various items. Some of the items are produced at both the plants. These plants keep the record of their monthly procedure in unsorted data files having following structure:

Product Code : 5 Numeric digits
Product Name : 10 Characters
Quantity produced : 10 Numeric digits
The files are sent to their head office where the two files are used to create a single file having the same structure. This master file has only one entry for one Product Code. Write a program COBOL which will do the processing for XYZ manufacturer.

5 (a) Identify the error/errors in the following COBOL statements. Give reasons:

(i) DIVIDE A BY B AND MULTIPLY B BY C
(ii) COMPUTE X = Y + Z ROUNDED
(iii) If A = 3 OR IF A = 4
PERFORM PARA_A
END_IF
(iv) MOVE A, B, TO CORRESPONDING C,D,
(v) GO TO PARA_A THRU PARA-B

(b) Write a COBOL program to Characters compound interest from disk records of following structure:

Account Number : 5 characters
Depositor�s name : 25 characters
Amount : 5 digits
Rate of interest : 2 digits
Investment period : 2 digits
The formula to be used is
Confounded amount = Amount (1 + Rate of interest/100) Investment period

Comments are closed.