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 Profile Log in to check your private messages Log in
 
REGARDING HIGH-VALUES AND LOW-VALUES

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

New User


Joined: 24 May 2005
Posts: 45
Location: Noida

PostPosted: Wed Aug 24, 2005 1:54 am    Post subject: REGARDING HIGH-VALUES AND LOW-VALUES
Reply with quote

PLEASE HELP
WHAT IS MEANT BY MOVE HIGH-VALUES OR MOVE LOW-VALUES icon_sad.gif
REGARDS
VISHAL
Back to top
View user's profile Send private message

jhony

New User


Joined: 24 Jun 2005
Posts: 2
Location: pune

PostPosted: Wed Aug 24, 2005 3:01 am    Post subject: jhony.
Reply with quote

hi friend,

Moving high values to low values, In case of cobol program when you move high values into low values truncation happens in the resulted value.
When you move an alpha numeric value its justification is left justification and right truncation.If you use numeric values ,the justification is right and the truncation happens on left side and padding also happens on left side..

I think its the suitable answer for this type of que...
and at the same time refer your que...once...

bye.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Aug 24, 2005 7:36 am    Post subject:
Reply with quote

Hi VISHAL,

It really depends upon the computing environment and its vendor. But for IBM mainframes MOVE LOW-VALUES moves binary zeros (X'00') to the bytes in the target field; MOVE HIGH-VALUES moves the highest byte value possible (X'FF') to the bytes in the target field.
Back to top
View user's profile Send private message
sonalig

New User


Joined: 22 Aug 2005
Posts: 7
Location: India

PostPosted: Wed Aug 24, 2005 10:36 am    Post subject: Re: REGARDING HIGH-VALUES AND LOW-VALUES
Reply with quote

Hi,
LOW-VALUES and HIGH-VALUES are figurative constants that represent the lowest and highest possible values for an alphanumeric data item. You would use them anytime you want to set or compare a data item to "all bits off" or "all bits on" values.

On system 390, LOW-VALUE = X'00' and HIGH-VALUE = X'FF'.

Correct me if i'm wrong.

Thanks,
Sonali.
Back to top
View user's profile Send private message
sendil

New User


Joined: 30 Jun 2005
Posts: 27

PostPosted: Thu Aug 25, 2005 12:23 pm    Post subject:
Reply with quote

HIGH-VALUE/HIGH-VALUES
Represents one or more occurrences of the character that has the
highest ordinal position in the collating sequence used. For the
EBCDIC collating sequence, the character is X'FF'; for other collating
sequences, the actual character used depends on the collating sequence
used. HIGH-VALUE is treated as an alphanumeric literal.
LOW-VALUE/LOW-VALUES
Represents one or more occurrences of the character that has the
lowest ordinal position in the collating sequence used. For the
EBCDIC collating sequence, the character is X'00'; for other collating
sequences, the actual character used depends on the collating sequence
used. LOW-VALUE is treated as an alphanumeric literal.
Back to top
View user's profile Send private message
harinatha

New User


Joined: 24 Jul 2005
Posts: 28

PostPosted: Thu Aug 25, 2005 7:55 pm    Post subject: Re: REGARDING HIGH-VALUES AND LOW-VALUES
Reply with quote

Hi,

Can any one explain with examples..

Take below one or give your own example....
1)

01 WS-NUM PIC 9(4)

MOVE HIGH-VALUES TO WS-NUM

Now what will be the value of WS-NUM

MOVE LOW-VALUES TO WS-NUM

Now what will be the value of WS-NUM

2)

01 WS-VAR PIC X(4)

MOVE HIGH-VALUES TO WS-VAR

Now what will be the value of WS-VAR

MOVE LOW-VALUES TO WS-VAR

Now what will be the value of WS-VAR.

Thanks & Regards,
Hari.
Back to top
View user's profile Send private message
jhony

New User


Joined: 24 Jun 2005
Posts: 2
Location: pune

PostPosted: Fri Aug 26, 2005 12:08 am    Post subject:
Reply with quote

1)

01 WS-NUM PIC 9(4)

MOVE HIGH-VALUES TO WS-NUM

Now what will be the value of WS-NUM

MOVE LOW-VALUES TO WS-NUM

.
---->ws-num = 0000.

2)

01 WS-VAR PIC X(4)

MOVE HIGH-VALUES TO WS-VAR

Now what will be the value of WS-VAR

MOVE LOW-VALUES TO WS-VAR

------>ws-num = 0000.

As far my knowledge these are the correct answers....if you doubt refer once the cobol comlete ref... by M.k.Roy...
bye..
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Fri Aug 26, 2005 4:53 pm    Post subject: Re: REGARDING HIGH-VALUES AND LOW-VALUES
Reply with quote

Hi jhony,

Quote:
01 WS-NUM PIC 9(4)

MOVE HIGH-VALUES TO WS-NUM

Now what will be the value of WS-NUM

MOVE LOW-VALUES TO WS-NUM

Now what will be the value of WS-NUM


I wonder that work at all....

AFAIK.....If destination in a MOVE stmt is a numeric or numeric edited item, you cant pass HIGH-VALUES or LOW-VALUES to it....

Quote:
01 WS-VAR PIC X(4)

MOVE HIGH-VALUES TO WS-VAR

Now what will be the value of WS-VAR

MOVE LOW-VALUES TO WS-VAR

------>ws-num = 0000.


moving HIGH-VALUES will show FFFF, while LOW-VALUES does 0000.

Regards,

Priyesh.
Back to top
View user's profile Send private message
sendil

New User


Joined: 30 Jun 2005
Posts: 27

PostPosted: Mon Aug 29, 2005 11:10 am    Post subject:
Reply with quote

hi priyesh,

Your answer is correct FFFF/0000. This concept is mainly used in to locate key field, when you are using STARTBR,READNEXT or START command. The low and high values are inserted in a file by using PARM = 'LOW' or PARM='HIGH'. If you are inserting a low value record in a file, this record is considered as a first record.


Thanks
Sendil
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 Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 4 Tue Jul 25, 2017 12: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