COBOL Fundamentals Review
Provides a brief review of arithmetic operations used in COBOL.
| Basic Arithmetic Operations
The four basic arithmetic operations. The data type used for operands in arithmetic operations. |
Data Specifications
Explains coding requirements for using decimals, signed numbers and various coding options in COBOL.
| Arithmetic With Decimal Numbers
Coding of a PICTURE clause and a VALUE clause for a field that will store decimal numbers. |
| MOVE Numeric Fields
How numeric fields are moved. Coding of MOVE, ADD or other arithmetic statements to move numeric fields to storage. |
| Signed Numbers
Coding of a PICTURE clause and a VALUE clause for a field that will hold a signed number. |
| Coding Options
ROUNDED, GIVING, ON SIZE ERROR, REMAINDER |
Coding Arithmetic Statements
Explains in detail how to code the four basic arithmetic operations and the COMPUTE statement using the correct format.
| ADD
Coding ADD statements. Coding ROUNDED, GIVING and ON SIZE ERROR in ADD statements. |
| SUBTRACT
Coding SUBTRACT statements. Coding the GIVING option with SUBTRACT statements. |
| MULTIPLY and DIVIDE
Coding MULTIPLY and DIVIDE statements. Coding ROUNDED, GIVING, ON SIZE ERROR and REMAINDER as appropriate. How to check for division by zero in your computations. |
| COMPUTE
The hierarchy of operations used in COMPUTE statements. Coding COMPUTE statements that are equivalent to arithmetic statements. |
| Coding Techniques
How the need to retain intermediate results affects whether to code a COMPUTE statement or multiple arithmetic statements. How and why to use the sign test and the class test. |
USAGE Clause
Describes three USAGE clauses and explains how to use each to define storage areas used in COBOL arithmetic operations.
| Zoned Decimal Storage
The COBOL default for the USAGE clause. How data is stored in a zoned decimal format. |
| Packed Decimal Storage
Coding of a storage area as packed decimal format. Why packed decimal storage is used. |
| Binary Storage
Coding a storage area for binary storage. When binary storage is used. |
Getting Numeric Results
Explains various techniques to maximize program efficiency and to assure accuracy of arithmetic computations.
| Checklist for Accuracy
Factors that determine the results of numeric computations. The field size required for storage of results of a computation. |
| Accuracy With Packed Storage
The correct procedures to initialize packed fields and display packed fields. |
| Efficiencies
Coding techniques which can make computations more efficient. |
|