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

REGARDING HIGH-VALUES AND LOW-VALUES


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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
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
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
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: 1448
Location: Chicago, IL

PostPosted: Fri Aug 26, 2005 4:53 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
Search our Forums:

Back to Top