How to Write a Simple COBOL Program
COBOL--COmmon Business Oriented Language--is a programming language that is hard to learn. In order to be able to program in COBOL you need either many years of schooling or an exceptional teacher on the job. However, almost anyone can learn to write a simple COBOL program. The following will give you an inside view to learn how to write a simple COBOL program.
Instructions
-
-
1
Understand the nature of COBOL. COBOL programmers are highly skilled and in demand. The reason is that although lengthy, COBOL is long lasting. Therefore even writing a simple COBOL program can be time consuming but worthwhile.
-
2
Follow the language. COBOL was supposed to be a readable language that even non-programmers could understand. This didn't happen, but since the COBOL language is self-documenting it is easier to understand than other programming languages.
-
-
3
Know the three main programming parts. They consist of sequence, selection and iteration.
-
4
Figure out what is required. When writing the program you first need to know what is expected. If you don't understand the requirements, you can't tell the computer what is required.
-
5
Write the statements. After knowing where you want to go you need to put in the statements that will take you there. The computer needs to know exactly what you need in order to produce the results.
-
6
Make sure the statements are put in the correct order and submit the program. If you get error messages return to the program, correct it and then resubmit it. You have now completed your simple COBOL program.
-
1
Tips & Warnings
There are quite a few COBOL reserved words; you need to know them so you don't put them in your statements.
Computers are not mind readers--make sure you use the necessary statements to make your program work.