Tags

, , , , , , , , ,

LOW-VALUES and HGH-VALUES are Figurative constants in COBOL.

LOW-VALUES refers the lowest value in collating sequence.
(Hexadecimal Value – x’00’) – Minimum possible value for a character (EBCDIC)

HGH-VALUES refers the highest value in collating sequence
(Hexadecimal Value – X’FF’) – Maximum possible value for a character (EBCDIC)

Collating Sequence is the sequence of a system which decides the equivalent numeric value for each character typed in keyboard and the precedence b/w characters.

In PC, ASCII is the default collating sequence, while in Mainframe EBCDIC is the default.

So usually in Mainframe code, along with checking if a field has SPACES or ZEROS, field is also checked to see if it has these values (LOW-VALUES and HGH-VALUES) and then initialize accordingly.

Collating sequence of ASCII and EDCDIC can be found in below link
https://supportline.microfocus.com/documentation/books/nx40/lracha.htm

You can also set the required collating sequence inside your COBOL program.
Below post clearly explains it.
http://mainframe-tips-and-tricks.blogspot.com/2011/12/cobol-what-exactly-low-values-and-high.html

 

Advertisements