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
 

 

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
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 Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
No new posts Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm


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