You are on page 1of 2

Code No: NR210503 NR

II B.Tech I Semester Supplementary Examinations, February 2007


DATA PROCESSING AND FILE ORGANIZATION (COBOL)
( Common to Computer Science & Engineering, Information Technology
and Computer Science & Systems Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????

1. (a) How many times will the procedure named PROCESS-ROUTINE be executed
by the following PERFORM statements? [4x2=8]
i. PERFORM PROCESS-ROUTINE VARYING A FROM 1 BY 1 UNTIL
A=15
ii. PERFORM PROCESS-ROUTINE VARYING A FROM 1 BY 1 UNTIL
A>15
iii. PERFORM PROCESS-ROUTINE VARYING A FROM 1 BY 1 UNTIL
A<15
iv. PERFORM PROCESS-ROUTINE VARYING A FROM 1 BY 1 UNTIL
A=B
(b) The following is a PROCEDURE DIVISION statement
PERFORM XYZ VARYING 1 FROM 1 BY 1 UNTIL I>4
AFTER J FROM 0 BT-1 UNTIL J<-2
AFTER K FROM 1 BY 2 UNTIL K>8
i. What combinations of values will I,J and K have in the loop?
ii. How many times is the procedure named XYZ executed?
iii. Which data name varies least rapidly and which one most rapidly? [3+3+2=8]
2. (a) What is the function of class condition? Write the structure of a class condition
and write various rules of class condition. Illustrate through examples.
[4+2+2=8]
(b) What is the use of Condition-Name condition? Write the rules applicable for
a Condition-Name condition. Illustrate through examples. [4+2+2=8]
3. Explain with necessary flow chart the Master file creation and maintenance proce-
dure [8+8=16]
4. A student record contains student no, name of the student and marks in three
subjects as fields. Create a table of records for 20 students and enter the above in-
formation for these 20 students Write a Cobol program to find the total marks and
average marks of each student and print the information in the following format.
[16]

S.No. Roll No NAME M1 M2 M3 TOTAL AVERAGE


1 2001 abc 35 35 35 105 35.0
20 2020 xyz 40 40 40 160 40.0

1 of 2
Code No: NR210503 NR
5. (a) Explain with syntax and examples the FILE CONTROL paragraph of indexed
sequential files. [4+4=8]
(b) Explain with syntax and examples the following procedure division statements
for indexed sequential files. [4+4=8]

6. (a) Explain DECLARATIVES and FILE STATUS clause for relative files. [8]
(b) What is meant by data block ? Write down the important points that indicate
the advantages and disadvantages of blocking. [4+4=8]

7. There is a company whose marketing operation is divided into three zones and for
each zone there is a file. The organization of the file is indexed sequential. The file
contains the following information:-
ZONE NAME PIC X(15)
DISTRICT NAME PIC X(25)
SALESMAN NAME PIC X(20)
PRODUCT NAME PIC X(10)
AMOUNT PIC 9(4)V99
Merge these files and create a new file called MERGEIND.DAT. [16]

8. A bank invests its deposits a government, social and business Projects. A catalog
of theinvestments sorted in the assending order of Project codes, contain, for each
investment the following data: [16]

Project code (5 digits)


Project location (10 characters)
Project restriction (50 characters)
Date of investment (2 digits each for year, month and day)
Value of investment (in format 9(6)v99)

Write a COBOL program to print monthly investment report as shown below

MONTHLY INVESTMENTS REPORT

Name of month: ——— year: ———


SR.NO. PROJECT-CODE LOCATION DESCRIPTION VALUE
1 ——— —— ——— —–
2 ——— —— ——— —–

TOTAL MONTH INVESTMENT—————–

?????

2 of 2

You might also like