View previous topic :: View next topic
|
Author |
Message |
jai.jain Currently Banned New User
Joined: 18 Mar 2007 Posts: 3 Location: delhi
|
|
|
|
wat is d use of "HIGH VALUES" in COBOL. |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Moving High-values will move all 1's in the variable.
You may be required to do this when you want to move highest possible value in that variable.
Especially in 'keys' of file when doing file-balancing ( Program in which you compare the records of two files and do some processing based on that.) |
|
Back to top |
|
|
kgumraj
Active User
Joined: 01 May 2006 Posts: 151 Location: Hyderabad
|
|
|
|
Hi,
High Values pass X'FF' value to the variables, while Low-values pass X'00' to the variable.
This is used in debugging purpose, it is not exactly Spaces, you can see that in the editor. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
The comment "not exactly spaces" could easily confuse beginners.
Other than x'40', nothing else is a space. Two value are either equal or they are not.
High and Low values have uses other than debugging. Let's say I am processing two keyed files sequentially in parallel and have WORKING-STORAGE variables, say WS-LASTKEY1 and WS-LASTKEY2, which retain the last key value I have read from their respective files. When I have reached AT END on, say, file#1, a common technique is to move HIGH-VALUE to WS-LASTKEY1. Any program code comparing the key of file#2 will be less. |
|
Back to top |
|
|
|