View previous topic :: View next topic
|
Author |
Message |
sribks2005
New User
Joined: 04 Apr 2005 Posts: 20 Location: Mysore
|
|
|
|
hi,
Variable Declaration.
===============
01 ABC pic S9(9) comp-3.
Value
====
This variable is having value 123455633F.
But Comp-3 value can have either "C" or "D" as its last character to consider it has numeric.
Can anybody tell me why Comp-3 value gets 123455633F type of value??
This variable is satisfying non-numeric test.
waiting for your replies
Thanks |
|
Back to top |
|
|
sribks2005
New User
Joined: 04 Apr 2005 Posts: 20 Location: Mysore
|
|
|
|
hi all,
Please ignore the value i have given for that variable.
Correct value which it has got is 123455633F.
I was trying to make "F" bold, and it has come like that.
sorry for inconvenience
i want to know why it has got "F" in its last position instead of "C" or "D".
thank you |
|
Back to top |
|
|
mcmillan
Site Admin
Joined: 18 May 2003 Posts: 1210 Location: India
|
|
|
|
Quote: |
was trying to make "F" bold, and it has come like that. |
That's because, you have disabled BBCODE while posting the query.
Quote: |
want to know why it has got "F" in its last position instead of "C" or "D". |
This is because your data is UNSIGNED Positive at COMP-3 storage format. So system will insert 1111. |
|
Back to top |
|
|
somasundaran_k
Active User
Joined: 03 Jun 2003 Posts: 134
|
|
|
|
Hi sribks2005
The possible values for a sign fileds are A,B,C,D,E and F.
B and D - Negative
A,C,E and F - Positive.
hth
-Som |
|
Back to top |
|
|
mcmillan
Site Admin
Joined: 18 May 2003 Posts: 1210 Location: India
|
|
|
|
Quote: |
The possible values for a sign fileds are A,B,C,D,E and F. |
For Packed Decimal (COMP-3) ???? |
|
Back to top |
|
|
somasundaran_k
Active User
Joined: 03 Jun 2003 Posts: 134
|
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
You're right SOM. These sign codes have been around for many a year and are recognized for compatibility reasons. But are not generated by today's compilers/assemblers. |
|
Back to top |
|
|
sribks2005
New User
Joined: 04 Apr 2005 Posts: 20 Location: Mysore
|
|
|
|
hi all,
thank you very much for your inputs.
One more question,
why comp-3 value having F as its last char is failing numeric test??
waiting for your replies...
thank you |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Show us the field def and the instuction. Also the error msg.
Preferably use cut and paste to be sure the info is accurate and represents what you are seeing.
Thanx |
|
Back to top |
|
|
|