View previous topic :: View next topic
|
Author |
Message |
paramita.barman
New User
Joined: 12 Oct 2006 Posts: 18
|
|
|
|
Hi all,
I have 3 packed decimal fields.I am doing a computation among the 1st 2 and storing it in the 3rd field(R).
The result(Suppose R) of the computation is producing some negative results.
Then I am moving the value of the result field to a field of an output file whose data type is numeric(Suppose F), as follows,
F=R
But in place of 'MINUS SIGN' of result(R), I am getting 'GARBAGE VALUE' in my file.
Could anyone tell me why it is happening and what should I do to rectify it? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
What is the picture of the output field? |
|
Back to top |
|
|
paramita.barman
New User
Joined: 12 Oct 2006 Posts: 18
|
|
|
|
@ William
Its PIC clause is Numeric(N). |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
What language? |
|
Back to top |
|
|
paramita.barman
New User
Joined: 12 Oct 2006 Posts: 18
|
|
|
|
@ William
Easytrieve. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Though 'N' is zoned decimal, the last digit is still carrying the sign. You need to define F with a mask that provides for the sign like
F W 7 N MASK('ZZ,ZZ9-') |
|
Back to top |
|
|
|