Not asking for anybody to write a program ,was hoping somebody would be so kind and give me a program that matches the question please.
A small shopkeeper uses a simple computer system to keep an up to date inventory of all products stocked. Every week the shopkeeper updates the stock file with a series of stock amendments, stored on another file. The format of both TEXT FILES is shown below, with each record stored in ascending order of product code, and each field being separated by a comma. Both files tenninate with a special "sentinel" product code of 9999.
Stock File.
Product Code 4 digits
Quantity 4 digits (in the range 1000 to 9999)
Buying Price 4 digits
Sale Price 4 digits
Stock Amendments File.
Product Code 4 digits
Amendment Type 1 character 'I' for an issue from stock.
'R' for a receipt into stock.
'B' for an amendment to the buying price.
'S' for an amendment to the sale price.
'D' for a deletion of the stock item.
Value 4 digits
NOTE
The data item "Value" will be zero in the case of a stock item deletion.
Find a program that will update the existing stock file, creating a new stock file, in the
same order as the original. It is possible that a stock item will have one, more than one,
or no transactions during a week. After the update of a master record, any stock item
that is outside the given range should also have the record written to a "query file".
You can assume that there are no transactions in the stock amendments file that do not
have matching product codes in the stock file.