Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Use of "HIGH VALUES" in COBOL.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: Use of "HIGH VALUES" in COBOL.
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: 685
Location: Earth

PostPosted: Mon Apr 09, 2007 10:27 pm    Post subject: Re: wat is d use of "HIGH VALUES" in COBOL.
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    Post subject:
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

Active Member


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

PostPosted: Tue Apr 10, 2007 5:42 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us