Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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: 1206
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 Question for Cobol Report Writer jackzhang75 COBOL Programming 2 Wed May 27, 2020 4:35 am
No new posts Compare multiple files using JCL/Rexx... tanvi110788 JCL & VSAM 4 Tue May 19, 2020 5:47 pm
No new posts JDBC Driver -Default Values yogi.47eie DB2 0 Mon May 18, 2020 7:27 pm
No new posts Need example for CALL 'ISRSUPC' in COBOL Sue Adams COBOL Programming 2 Thu May 14, 2020 5:32 am
No new posts COBOL Student learning COBOL File Han... torrind COBOL Programming 3 Sat May 09, 2020 3:40 am

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