Course Code  CS-03
Course Title File Structure and Programming in COBOL
Assignment Number  MCA(2)-03/project/03
Maximum Marks  15
Last Date of Submission   31st October, 2003

This is a Project. There are two questions in this Assignment. Answer both the questions. The question carries equal weightage. You must run the resultant Program and submit the Program logic and sample input and output.  Please go through the guidelines of TMA and project in your Starter Kit.

Question 1: A bank stores following disk files for various transactions relating to money deposit and withdrawal:
File 1: Account Master
Organisation : Index-Sequential on Account Number
Structure :
01 - 09 Account number
10 - 30 Account Holder Name
31 - 60 Account Holder Address
File 2: Employee Master

Organisation : Index - Sequential on Employee Number
Structure :
01-09 Transaction Number
10-18 Date of Transaction
19-20 Transaction Type (Withdrawal / deposit etc.)
21-29 Account Number for withdrawal or deposit
30-38 Employee number who has processed the transaction
Label are standard.  The first field of the records in each file represents the key field.

Write a COBOL program the updates the Balance in the Account master and prints each of the transaction (Reporting error if any in the following output format :
OUTPUT
structure :
  0-09 Transaction Number
10-18 Date of Transaction.
19-20 Transaction Type (Withdrawal /deposit etc.)
21-29 Account Number for withdrawal or deposit
30-49 Account Holder's Name
50-57 Balance after transaction
58-66 Employee number who has processed the transaction
67-86 Name of the person who has processed the transaction

The file should be sorted in the Order of Date of Transaction and if the date is same then on account number.

 Question 2: A store has two brances: Branch A and Branch B.  Both the branches of the store sells many products.  Some of these products are common to both the branches, while some are available only in one branch.  Both the store keep the unsorted inventory file in the following format:
01 - 05 Product code
06 - 25 Product name
26 - 30 Quantity
However, due to some reasons the store decided to merge the two branches.  Thus, the inventory files, are also to be merged.  Write a Program in COBOL that merges the two inventory file into a single file.