Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
What is High values and Low values in cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
crrindia

Active User


Joined: 02 Jul 2005
Posts: 124
Location: Gurgaon

PostPosted: Tue Jul 25, 2006 6:38 pm    Post subject: What is High values and Low values in cobol
Reply with quote

Any one of you can please explain to me what is high values and low values in cobol (EBCDIC).

I heard that low values are 00, and high values are FF. But I wanted to know what will happen when I do the following operations?

Code:
WORKING-STORAGE SECTION.

01  A           PIC 9(2).
01  B           PIC X(2).

01  C           PIC 9(2).
01  D           PIC X(2).

PROCEDURE DIVISION.

MOVE LOW-VALUES  TO A.
MOVE LOW-VALUES  TO B.
MOVE HIGH-VALUES TO C.
MOVE HIGH-VALUES TO D.


After this what values are stored in A, B, C,and D? Can any one of you please explain to me.
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Jul 25, 2006 10:37 pm    Post subject: Re: High Values & Low Values.
Reply with quote

Hi,

First, You will not be able to Compile this.

You cannot move LOW-VALUES or HIGH-VALUES to a "PIC 9" field.

Once you remove these, the hex value in B and D are:

B = x'0000'
D = x'FFFF'

Dave
Back to top
View user's profile Send private message
crrindia

Active User


Joined: 02 Jul 2005
Posts: 124
Location: Gurgaon

PostPosted: Thu Jul 27, 2006 4:38 pm    Post subject: Re: High Values & Low Values.
Reply with quote

Hi Dave, Thank you very much for your information.
Can you please let me know in which scenarios we will move these LOW/HIGH Values?

Thanks!
Rat.
Back to top
View user's profile Send private message
satish_r84

New User


Joined: 31 Jul 2006
Posts: 6

PostPosted: Mon Jul 31, 2006 8:35 am    Post subject: Re: High Values & Low Values.
Reply with quote

hi ,

What is the use of low or high values, when do we use it..
can you jus explain this with an example

Regards
satish
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Mon Jul 31, 2006 10:57 am    Post subject:
Reply with quote

Ex:

Low values: we generally used to initialize variable.

High value : Suppose i want to get minimum value of an array variable which have 10 occurance so i will write me code like this.

Move high values to min-value

perform until i>10
If table(i) < min-value
move table(i) to min-value
end-if
compute i = i+1
end-perform.
Back to top
View user's profile Send private message
shivaleela

New User


Joined: 27 Jul 2006
Posts: 3

PostPosted: Fri Aug 04, 2006 11:18 pm    Post subject:
Reply with quote

Hi,
Is LOW VALUES used for the similar purpose as given in the above eg?

Anybody else know more specific examples of usage of LOW VALUES and HIGH VALUES


thx
shivu
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 -> COBOL Programming 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. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us