| 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 type of applications
where Relative file organisation will be preferred over sequential
organisation |
|
(d) |
Explain the use of SEARCH
statement in COBOL with the help of two example. |
|
(e) |
What is the purpose of STRING
statement ? Explain with help of an example. |
|
(f) |
How can you implement
multidimentional array in COBOL ? Explain with the help
of |
|
|
an example. |
| 2. |
|
XYZ Medical Store maintains a
Medicine Statue file. Size of this file is about 10,000
|
|
|
records, and the structure is
:
| Medicine Name |
25 Characters |
| Manufacturer'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. Specifically
indicate the file organisation you have chosen for the 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) |
SYNCHRONIS=ZED
clause |
|
(d) |
ADD statement with ROUNDED and
ON SIZE ERROR option |
|
(e) |
PERFORM statement with UNTIL
and VARYING option |
| 4. |
|
XYZ manufacturer has two
production plants. These plants produce various
items. |
|
|
Some of the items are
produced at both the plants. These plants keep the records of their
monthly produce 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 filesare used to create a single file
having following structure. |
| 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 (iii) IF A =
3 OR IF A = 4 PERFORM PARA_4
END_IF (iv) MOVE A, B, TO CORRESPONDING C, D (v) GO TO PARA_A
THRU PARA_B |
|
(b) |
Write a COBOL program to
create compound interest from disk records of following
|
|
|
structure :
| Account Number |
5 character |
| Depositor's Name |
25 characters |
| Amount |
5 digits |
| Rate of interest |
2 digits |
| Investment period |
2
digits |
The formula to be used is
Compound Amount
=
Amount ( 1 + Rate of interest/100)Investment
period |