Cobol- Low Values and High Values

The meaning for low values is nothing is less than this. The value for high value is nothing is greater than this.

 How to use this concept?

01  WS-X               PIC 9999.
01  WS-Y               PIC 9999.

MOVE LOW-VALUES  TO WS-X
MOVE HIGH-VALUES TO WS-Y

Low values/High values are basically CHARs. So we can not move.

01  WS-X               PIC X(4).
01  WS-Y               PIC X(4).

The high values and low values are expressly alphanumeric items consisting of strings of X’FF’ or X’00’ respectively.

MOVE LOW-VALUES  TO WS-X
MOVE HIGH-VALUES TO WS-Y

In this case we can move without compilation error.

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.