COBOL Low Values Vs High Values

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

Advertisements

How to Work with COBOL Low-values and High-values

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’t 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.

Related Posts

Get new content delivered directly to your inbox.

Author: Srini

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