CS-03 : FILE STRUCTURE & PROGRAMMING IN COBOL
 DEC 1999


Prepared by: Little Bit Heaven
Time: 2 hours  

Max Marks: 60

Note: There are 5 questions in this paper.  Question 1 is compulsory and carries 40 marks.  Attempt any three from the rest.

1 (a) What is Y2k problem? Why is this problem occurring with many COBOL programs? Propose a solution to this problem, from the view point of COBOL.
(b) How can SORTING of data in a data file be done in COBOL? Suppose the data is in an array of COBOL then how will the sorting be done.
(c) Compare and contrast the characteristics of relative file organisation with indexed  sequential file organisation. Explain the  application where you will prefer relative file organisation in comparison to indexed sequential file organisation.
(d) What is the use of SEARCH statement in COBOL? Explain the working  logic of this statement. Give example of this statement.
(e) What are the level 77 & 88 entries? Where are they used in COBOL? Can level 77 or 88 entry be replaced by normal record entries? Give reasons for answer.
(f) What are the usage of STRING & UNSTRING statements of COBOL? Explain with the help of one example each.
2 Write a program in COBOL for creating an indexed master file for a banking environment from the following files:
Account balance file                        
Account no.   5 digits
Balance         8 digits
account holder name 25 characters

Transaction file of the day
Account No.   5 digits
Withdrawal or Deposit 1 digit code
Amount   6 digits

The format for index master file is
Account No 5 digits
Account holder name  25 Characters
Present Balance 8 digits( obtained from using account balance & transaction file) 
3 ABC Video Library maintains its records in a COBOL file of following format:
Video cassette file : (Not Sorted)
Name of Video 25 characters
Video Code No 5 digits
Caste 25 characters
No.of Cassettes 2 digits

The library had 2 offices both having similar file structure, but due to paucity of funds both the offices are being merged. Write the COBOL program to create one video cassette file from the 2 files of the offices. Please note there may be some cassettes which are available in both the libraries, so take necessary precautions while making single video cassette file.
4 Write a program in COBOL to print total sales of each sales person from the following
 transaction file:
name: SALES TRANSACTION (Not Sorted)
Salesperson No. 2digits
Salesperson name 25 characters
Amount of sales 8 digits

Please note the following points will programming :
  • -There are 20 salespersons numbered 1 to 20
  • There may be numerous records per salesman
  • Input records are not sorted
  • The output will include individual sales record and their total.
5 Explain the following COBOL verbs with the help of one example each:
a. INSPECT statement
b. SYNCHRONIZED clause
c. REDEFINES clause
d. SIZE ERROR option
e. while loop implementation using PERFORM

 

Hosted by www.Geocities.ws

1