| 1. |
(a) |
How is database approach different from
the COBOL Programming approaches? In what situations is COBOL
Programming better than database systems? |
|
(b) |
What is the use of having four divisions
of COBOL program? what is the need of these division? of
each |
|
(c) |
Compare and contrast the characteristics
of indexed sequential file organisation with relative file
organisation. What are the types of applications where relative file
organisation may be preferred over indexed sequential
organisation? |
|
(d) |
"Input errors are the cause of more
programming problems than any other type if error". What
programming constructs in COBOL may be used to identify input
errors? |
|
(e) |
How is table represented in COBOL?
How is a value to be searched in this table? Explain with the
help of two examples. |
| 2. |
|
Write a Program in COBOL for creating an
indexed master file for a software |
|
|
storehouse, which keeps the following
files: Software Stock
file:
Software
Code
: 8
Characters
Number of copies available
: 5
digits
Software
description
: 50 Characters Sales
file:
Software
Code
: 8
Characters
Customer
Code
: 8
Characters
Customer
Name
: 25
Characters
No. of copies
sold
: 5
Characters
Date of
sale
: 8 Characters The index
master which needs to be created
includes:
Software
code
: 8
Characters
Software
description
: 50
Characters
No. of copies
left
: 5
digits
after processing
stock file
with sales file |
| 3. |
|
A departmental store had two branches.
Both the branches keep information about the items using the
following format: |
|
|
Item File: (The file is not
sorted) Item
Code
: 5
Characters Item
Name
: 25
Characters Acquired
Stock
: 10
digits Item
Type
:
1 Characters Due to some reason one of the departmental store
branches was closed down. All the items of this branch were moved to
other branches.
Write a program in COBOL to create a unified
item file of the individual item files of the departmental store
branches. Please note that both the departmental store branches were
having few common items. |
| 4. |
|
Write a program in COBOL to print the
best performance of a salesperson from each zone using the
following transaction file: |
|
|
SALES DATA: (Not
sorted) Zone
number :
1 digit (only five zones to be
assumed)
Salesperson number :
1 digit (only five salesperson in each
zone)
Salesperson
name :
25 Characters
Amount of
sales :
8 digits Date of
sales :
8 Characters Please note the following: |
|
|
- There are maximum 5 zones an d 5
salespersons in each zone
- Each salesperson may have made many
sales.
- The records of transaction file are
not in any order.
- The output needs to include the zone
number and the salesperson number and name of the
salesperson who has made the maximum sales in that zone.
|
| 5. |
|
Explain the following COBOL verbs with
one example each: |
|
|
(a) REDEFINES clause (b) PERFORM with
VARYING statements (c) MOVE CORRESPONDING statement (d) STRING
statement (e) GOTO statement |