Program for employee master creation and update and listing.hint: employee master creation file contains 10 records of 10 employees as.Emp code ename designation jd bp sl etc?

Showing Answers 1 - 4 of 4 Answers

It's is a simplest model for master process.creat was implement by insert employee record(write statement for VSAM and insert for DB2), update as the name(rewrite for VSAM and update for DB2) and list was done by inquire the file/database(read for VSAM and select for DB2). If you use VSAM or other file system, you should code file declaration in file section.

  Was this answer useful?  Yes

Priyakk

  • Mar 14th, 2007
 

To start with, lets consider sequential files to be simple. In the IO Section of the Environment Division, assign a sequential file which is the master file and in the Data Division include all the field names given in the quesion under the FD entry. Do the same for a sequential file from which the data must be written to the master file. 
   CREATION: OPEN the input file and WRITE the records into the master file.
   UPDATION: For any file to be updated, it m,ust be opened in the IO mode and use  REWRITE to update the records whicch are already present int he master file. to add new records to the master file it must be opened in the EXTEND mode.
  LISTING: To display all the records from the master file, DISPLAY can be used to get the records on to the VDU.or to have the records in a new file, it can be written to an another file using WRITE.


NOTE:

Everytime a file is opened in a mode, to open it in an another mode...the file must be closed and then opened in the other mode.
 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions