From the course: COBOL Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Merge two employee files

Challenge: Merge two employee files - COBOL Tutorial

From the course: COBOL Essential Training

Start my 1-month free trial

Challenge: Merge two employee files

(upbeat music) - [Instructor] The next challenge involves reading into employee files. It seems that Acme Dynamite Company just purchase Fuses, Incorporated. So your job is to write a program that can merge the two employee files and provide a third that has all the employees in sorted order. I suggest that you might want to take a look at the mergestudents.cbl that we used earlier to merge two student files. The two input files for this program are the acme.dat and fusesincorporated.dat. It's important to note that both files have already been reformatted by the company, so they have the same length and field sizes. Make sure that you add logic to check for a valid file status, and your job is to update the program to merge the two employee files. When you're done, you'll create an output file with all the employees sorted by Social Security number. For an additional challenge, try closing the output file when…

Contents