View previous topic :: View next topic
|
Author |
Message |
cmohanraj
New User
Joined: 04 Apr 2005 Posts: 15
|
|
|
|
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 |
|
|
David P
Active User
Joined: 11 Apr 2005 Posts: 106 Location: Cincinnati Ohio
|
|
|
|
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 |
|
|
learnmf
Active User
Joined: 14 Mar 2005 Posts: 123
|
|
|
|
HI CHandrasekhar
As i Think LOw-VALUE can not be move to Numeric.
Thanks
CHandra[/quote] |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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. |
|
Back to top |
|
|
learnmf
Active User
Joined: 14 Mar 2005 Posts: 123
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Chandra,
I just read my post. Don't be offended by the Roll Eyes . They were intended for ME for not remembering the CICS field name I referred to. |
|
Back to top |
|
|
|