IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Use of "HIGH VALUES" in COBOL.


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jai.jain
Currently Banned

New User


Joined: 18 Mar 2007
Posts: 3
Location: delhi

PostPosted: Mon Apr 09, 2007 7:49 pm
Reply with quote

wat is d use of "HIGH VALUES" in COBOL.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Mon Apr 09, 2007 10:27 pm
Reply with quote

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.) icon_smile.gif
Back to top
View user's profile Send private message
kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Tue Apr 10, 2007 12:37 pm
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Tue Apr 10, 2007 5:42 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top