| Author |
Message |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 998 Location: At my desk
|
|
|
|
| birdy K wrote: |
| Code: |
01 fval pic x(06) value '00000}'
01 tsval redefines fval.
05 sval pic s9(06).
01 tval pic s9(05) comp-3. |
move fval to tsval. Now sval value is -000000. But while moving from sval to tval. It is showing as +00000. I am seeing this values in xpeditor. |
Because the COBOL compiler is insuring that the sign is correct and prevents the negetive value for zero.
Try
| Code: |
01 fval pic x(03) value X'00000}'
01 tval pic s9(05) comp-3.
01 sval refefines tval pic x(3). |
When you move fval to sval, tval will be a -0..... |
|
| Back to top |
|
 |
References
|
Posted: Fri May 09, 2008 5:11 pm Post subject: Re: |
 |
|
|
 |
birdy K
New User
Joined: 05 Mar 2008 Posts: 14 Location: chennai
|
|
|
|
| Thank u for all. My onsite told now not to include -. Anyway if anyone knows Please suggest. |
|
| Back to top |
|
 |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 998 Location: At my desk
|
|
|
|
| birdy K wrote: |
| My onsite told now not to include -. Anyway if anyone knows Please suggest. |
Huh?
Not include the minus on the zero?
If anybody knows what?
Please suggest what? |
|
| Back to top |
|
 |
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 460 Location: Richmond, Virginia
|
|
|
|
I would be embarrassed to write a compiler that would let you have a value -0, and also embarrassed to show -0 on a report or screen.
In other words, what are the actual specs, and from what kind of user? |
|
| Back to top |
|
 |
acevedo
Active User
Joined: 11 May 2005 Posts: 252 Location: Spain
|
|
|
|
| I have the same doubts as CICS Guy |
|
| Back to top |
|
 |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 998 Location: At my desk
|
|
| Back to top |
|
 |
birdy K
New User
Joined: 05 Mar 2008 Posts: 14 Location: chennai
|
|
|
|
Hai everybody
Sorry for the Delay. I was out of my station. Thank You CICS Guy. I asked How to include - sign with zero. Anyway It is meaningless. But Onsite asked me to do that. Now they dont need that. But I am interested to know. So I asked your suggestion. When I asked your suggestion. I didnt see CICS Guy post. Thank you for all. |
|
| Back to top |
|
 |
|
|