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.

File error checking

File error checking - COBOL Tutorial

From the course: COBOL Essential Training

Start my 1-month free trial

File error checking

- [Instructor] Now that we've seen how to open an input file and write an output file, I wanted to show you also how you can open a file for input output. There are times where you might want to be able to actually update the existing records in a file. In this example, I'm going to take the employee file. And recently this company was taken over by another company and all the employees have a new start date of July 1st, 2020. So all the information stays the same, their employee ID, obviously their name, what department they're in and the gender are all the same, including their salary, but we do want to change the start date. So let's take a look at how we might do that. We still have in our environment division on line seven, we still have select employee file and assign it to empfile.dat. And I'm using the same file that I used for the other exercise. Although I did actually create a folder, 0403 in the chapter four…

Contents