Monday 28 July 2014

COBOL Usage clauses | COMP-3, COMP-1, COMP-5.

COBOL
COBOL Usage clauses.


Most computers can store data in two or more formats, and the Usage clause lets you specify the format that you want to use for a numeric field.

Although you don’t ever have to code Usage clauses, they can improve the storage and run-time efficiency of a program.

In practice, though, you need to code Usage clauses to tell the compiler what formats to use for specific fields.

In particular, you should specify numeric usages for fields that are going to be used for computations or numeric comparisons. If you don’t, your program will run less efficiently than it should be. Refer below the figure for more details.
COMP3
COBOL Usage clauses.

The Usage clause lets you specify the way that you want numeric fields to be stored. Because this improves the efficiency of a program, you should code either Packed-Decimal or Binary usage for all numeric fields that are going to be used in computations or numeric comparisons.

COBOL Share
Share COBOL Usage clauses.

Created with Artisteer

No comments:

Post a Comment

New In-feed ads