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.

How to read code and find logic errors

How to read code and find logic errors - COBOL Tutorial

From the course: COBOL Essential Training

Start my 1-month free trial

How to read code and find logic errors

- [Instructor] For this movie, I intentionally have errors in one of my programs, and I want to show you the process to problem solving. It compiles and it runs, but it does not work correctly. The idea for this program is to read in a file of employees called testdata.dat. Each employee has an SSN number a name, some other information along with an email address. And you can see that there are a few invalid email addresses. The first one does not have an At sign. The second from end has two At signs and the very last one has 11 At signs. So they should print out as invalid email. All right, before we start to look for the errors, let's run the program and see what happens. So I'm going to make sure I compile it. So I'm going to do a cobc-x and problemsolvestart.cbl. All right, so that worked now let's run it. Oops. I spelled something wrong. Oh, I forgot to slash, there we go. All right, well that really doesn't look…

Contents