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: 686
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
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm


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