Dec 1995

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

Time : 2 Hours

Maximum Marks : 60

1 (a) What is the purpose of level 77 and level 88 in COBOL? Give two examples of each to illustrate their use.

(b) Which of the following are incorrect and why?

(i) MOVE INPUT � M TO �MESSAGE�.
(ii) IF X IS EQUAL TO 30 OR 40 MOVE 30 TO X.
(iii) 02 A
03 B PIC X (2).
03 C PIC X (4).
02 X REDEFINES A.
03 Y.
04 Z PIC 9(5).

(iv) MOVE A, B TO C

(v) CLOSE FILA, FILB

(c) What is the role of SEARCH statement in COBOL? How does this statement operate on date? Explain it with the help of examples.

(d) For storing the population of 20 states in 20 districts for 2 decades, a three dimensional table is used. How many data items will occur in this table? Write the data Division for this table.

(e) Compare and contrast the MOVE and Group MOVE, with the help of examples.

(f) What is the purpose of MERGE statement? Explain it with the help of examples.

(g) List out the Procedure Division Statements for Relative Files. Explain the purpose of START statement with the help of an example.

(h) What are the statement/statements by which we can implement looping in COBOL? Give example

2 What is an Indexed Sequential file organisation? Explain the modes in which the Indexed files can be accessed. Discuss the Procedure Division statements for Indexed sequential files, with examples.

3 Write the Data Division and Procedure Division of a COBOL program for sorting an array of 10 elements using Bubble Sort.

4 (a) Consider the following program segment:

MOVE 25000 TO SAL
COMPUTE TAX = 0.15 *SAL
SUBTRACT TAX FROM SAL GIVING TOT
COMPUTE DEDUCT =0.10 * SAL
COMPUTE NETSAL= TOT � DEDUCT

Determine what will be the value of TOT, NESTAL and DEDUCT after execution of these statements.

(b) Modify the following program using PERFORM statements.

IFCODER <= 5 GO TO TAX-DED
ELSE GO TO ZERO
PARA 1
.
.
.
TEX-DED
COMPUTE TAX= GROSS RATES
COMPUTE TOTAL = GROSS � TAX.
GO TO PARA1.
PARA 2
.
.
.

(a) The payroll record of ABC company have the following structure:

Employee number : 4 digits
Employee name : 25 characters
Employee pay : 6 digits

Write a suitable Data Division of a COBOL program for this company. The company had decided to increase the pay of its employees as per the following rule:

Pay < 3000 15% Increase in Pay Pay >3000 but < 8000 10% Increase Pay >8000 5% Increase

Write the Procedure Division to implement this change for the company.

5 Explain the following by taking two examples on each.
(i) ACCEPT statement
(ii) SYNCHRONIZED clause
(iii) ON SIZE ERROR option
(iv) Class condition
(v ) GO TO DEPENDING

Comments are closed.