| 1. |
(a) |
"A well structured program
uses modularisation organisation." Comment on the above statement.
How may modularisation be done in COBOL ? Explain with the help of
an example. |
|
(b) |
How can you represent a two
dimensional array in COBOL ? Explain with the help of one example.
How can you find existence of a value in that array ? |
|
(c) |
How can you perform simple
arithmetic operations in COBOL ? Can a complex arithmetic operations
in COBOL ? Can a complex arithmetic expression be represented in one
statement in COBOL ? If yes, give example. If no, show how will you
be able to represent operation in that case. |
|
(d) |
with the help of an
example.How can you check in COBOL whether a given data value is
valid or not ? Explain |
|
(e) |
Suggest the application where
sequential file organisation will be the preferred organisation. How
do you update sequential files? Explain with an example.
|
|
(f) |
What is the need of Working
Storage Section ? Why do you need level 77 and level 88 entries ?
Give example. |
| 2. |
|
A business organisation keeps
its inventory using a master file. The daily transactions are
recorded in a transaction file and at the end of the day master
records are updated. Write a program in COBOL to do the above
processing. Make suitable assumptions, if any. Select a proper file
organisation. The structure of master and transaction files are as
under : |
|
|
Master file
:
item_code
5 alphabets
item_name
30 alphabets quantity in
stock 10 numeric
digits Data of last
update 8 characters
Transaction
file : Data of
transaction 8
characters
item_code
5 alphabets quantity
sold
10 numeric digits
The program should identify any possible
error. |
| 3. |
|
A university had two centers.
Both the centres had maintained the list of students. However, some
of the students were registered in both the centers. Write a program
in COBOL for the university to generate a consolidated list of total
students registered with it. A student registered in two different
courses will appear only once in the consolidated list. |
|
|
The format of the files are as
under : Student files
(center 1 and Center
2)
student_id
9 numeric
digits
student_name
25
characters
course_registered 20
characters
Date of registration 8 characters Consolidated
list :
student_id
9 numeric
digits
student_name
25
characters
first course registered 20
characters
Data of first course
registration
8 characters
|
| 4. |
|
Write a program to create an
employee pay file having relative file organisation. Presently the
data is stored in a transaction file. The transaction and employee
pay file (both) have the following format : |
|
|
employee_no
5 alphabets
employee_name
25 characters
employee_basic_pay 10 numeric
digits
benefits
10 numeric digits |
| 5. |
|
Explain the following COBOL
verbs with one example each : |
|
(a) |
MOVE CORRESPONDING
statement |
|
(b) |
DIVIDE statement with ROUNDED,
REMAINDER and ON SIZE ERROR option |
|
(c) |
REDEFINES clause |
|
(d) |
PERFORM statement with VARYING
and THROUGH options |
|
(e) |
INVALID KEY clause in case of
Indexed file organisation. |