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

Move Statement capability rules with LOW-VALUES


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
cmohanraj

New User


Joined: 04 Apr 2005
Posts: 15

PostPosted: Mon Apr 11, 2005 2:47 pm
Reply with quote

I have declared a working storage variable as a comp item.
77 ESDS-RBA PIC S9 (8) USAGE COMP.



MOVE LOW-VALUES TO ESDS-RBA.



I have encountered an error which states:



?"LOW-VALUES" and "ESDS-RBA (BINARY INTEGER)" did not follow the "MOVE" statement compatibility rules.

The statement is discarded.



Now tell me how to eliminate the error.
Back to top
View user's profile Send private message
David P

Active User


Joined: 11 Apr 2005
Posts: 106
Location: Cincinnati Ohio

PostPosted: Mon Apr 11, 2005 6:05 pm
Reply with quote

Hi,
As level - 77 is used for the variables that are not going to be modified through the execution you might be getting the error.
I believe using value clause (in working storage)should work for you.

regards,
David.
Back to top
View user's profile Send private message
learnmf

Active User


Joined: 14 Mar 2005
Posts: 123

PostPosted: Mon Apr 11, 2005 7:35 pm
Reply with quote

HI CHandrasekhar
As i Think LOw-VALUE can not be move to Numeric.

Thanks
CHandra[/quote]
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Apr 13, 2005 6:13 am
Reply with quote

HI CHandrasekhar,

LOW-VALUES are binary zeros. So if you move zeros to a COMP field it's the same as moving LOW-VALs, except that it works. icon_smile.gif
Back to top
View user's profile Send private message
learnmf

Active User


Joined: 14 Mar 2005
Posts: 123

PostPosted: Wed Apr 13, 2005 5:23 pm
Reply with quote

Hi Jack
Correct me.I will be happy to be cleare on this topic .So Correct me if i am wrong.
Low-value is NOT the "lowest legal value" in Cobol. "Low-value" is the
lowest possible value in the alphabetic colating sequence for a specific
machine, and applies only *alphabetic* fields. Numeric fields, on the
other hand, must be legal numeric *digits* in the aplhabetic set you are
using. The lowest legal *Number*(unsigned that is) is zero.


Thanks
Chandra
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Apr 14, 2005 6:38 am
Reply with quote

Hi Chandra,

LOW-VALUES is equiv to binary (COMP) zeros. HIGH-VALUES is equiv to a binary (COMP) minus one (-1); I guess THAT is the lowest legal value for a 1 byte COMP field.

That's why you'll see some pgms move -1 to a COMP indicator field; they want it to be X'FF'. DB2 pgms do it w/the null ind fields. CICS pgms do it too but I can't remember which field. icon_rolleyes.gif
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Apr 14, 2005 6:49 am
Reply with quote

Hi Chandra,

I just read my post. Don't be offended by the Roll Eyes icon_rolleyes.gif . They were intended for ME for not remembering the CICS field name I referred to.
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 COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
Search our Forums:

Back to Top