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.
Perform statement - COBOL Tutorial
From the course: COBOL Essential Training
Perform statement
- [Instructor] It's important to remember that COBOL is a sequential programming language which means that it starts with the first paragraph and the procedure division. And it continues to execute each command until it reaches a stop run. There are situations where you might need to redirect the execution of steps in a program. One option is using the GoTo command. Although there are not many situations where it's useful to use the GoTo command. There is one for example, in our data validation, if the incoming files if we encounter too many invalid records, it might be that the wrong file is being input into the program. So if the data in the files' corrupted, it makes sense to stop. Let's go back to our sales validation program. I've actually created an invalid sales dot dat file that all the records are invalid. So instead of processing the entire file, it makes sense that if I encounter let's say the first five…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Introduction to verbs3m 51s
-
(Locked)
Computational verbs7m 7s
-
(Locked)
Conditional expressions5m 36s
-
(Locked)
Perform statement3m 2s
-
(Locked)
Perform thru2m 30s
-
(Locked)
Perform times5m 9s
-
(Locked)
Challenge: Write code to simulate a cash register4m 13s
-
(Locked)
Solution: Simulated cash register4m 27s
-
-
-
-
-
-
-
-