Back to first page...
STRUCTURED PROGRAMMING WITH COBOL
Structured programming techniques used in the coding process
of any programming have proved to be useful.
If you code your source in a structured way, it will be easier
to debug, it will be easier to maintan (make modifications later) and
therefore more professional.
There are a few important points to which a programmer has to pay attention,
to end up with a "structured program" :
- Use Comments (The COBOL language specifics decrease the need for comments,
but you should still use them where ever appropriate),
- Use reasonably long and explanatory variable names, (In COBOL,
the same applies to paragraph labels),
- Avoid repeated pieces of code (use functions and/or subprograms instead),
- Avoid the "GO TO" statement as much as possible. (Please do not
forget that sometimes a "GO TO" statement is much more readable
than a complicated nesting of "DO WHILE", "DO UNTIL", "REPEAT UNTIL" "CASE" statements),
-
Structured Language Elements in COBOL
As you very well know, the general structured elements
in programming languages are :
The COBOL language is equipped with all these constructs; only the SYNTAXes
are a little different than the ones that you are familiar with.
Back to first page...