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

What is High values and Low values in cobol


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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: 1208
Location: Bangalore,India

PostPosted: Mon Jul 31, 2006 10:57 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


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