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: 964
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 Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm


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