Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
vishal_a

New User

Joined: 24 May 2005
Posts: 45
Location: Noida

 Posted: Wed Aug 24, 2005 1:54 am    Post subject: REGARDING HIGH-VALUES AND LOW-VALUES PLEASE HELP WHAT IS MEANT BY MOVE HIGH-VALUES OR MOVE LOW-VALUES REGARDS VISHAL

jhony

New User

Joined: 24 Jun 2005
Posts: 2
Location: pune

 Posted: Wed Aug 24, 2005 3:01 am    Post subject: jhony. 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.
mmwife

Super Moderator

Joined: 30 May 2003
Posts: 1592

 Posted: Wed Aug 24, 2005 7:36 am    Post subject: 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.
sonalig

New User

Joined: 22 Aug 2005
Posts: 7
Location: India

 Posted: Wed Aug 24, 2005 10:36 am    Post subject: Re: REGARDING HIGH-VALUES AND LOW-VALUES 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.
sendil

New User

Joined: 30 Jun 2005
Posts: 27

 Posted: Thu Aug 25, 2005 12:23 pm    Post subject: 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.
harinatha

New User

Joined: 24 Jul 2005
Posts: 28

 Posted: Thu Aug 25, 2005 7:55 pm    Post subject: Re: REGARDING HIGH-VALUES AND LOW-VALUES 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.
jhony

New User

Joined: 24 Jun 2005
Posts: 2
Location: pune

 Posted: Fri Aug 26, 2005 12:08 am    Post subject: 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..
priyesh.agrawal

Senior Member

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

Posted: Fri Aug 26, 2005 4:53 pm    Post subject: Re: REGARDING HIGH-VALUES AND LOW-VALUES

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.
sendil

New User

Joined: 30 Jun 2005
Posts: 27

 Posted: Mon Aug 29, 2005 11:10 am    Post subject: 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
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics LOW VALUES as a KEY juares castro DB2 10 Sat Apr 07, 2018 1:06 am Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am Need all records with high key kalidasvs SYNCSORT 15 Fri Feb 09, 2018 10:38 pm attchmvs from rexx subroutine that re... harisukumaran CLIST & REXX 1 Fri Jan 19, 2018 5:29 am Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us