View previous topic :: View next topic
|
Author |
Message |
Time2Live
New User
Joined: 27 Apr 2005 Posts: 43 Location: United States
|
|
|
|
Hi All,
I was wondering if you could tell me if it is possible to define a numeric field that will display a number with Both the '+' and '-' sign on the left side of the number.
It is easy to define to get the minus sign with s9999 and -9999, but I want to force the positive sign to display also without having to 'move +' it into a position.
Would like to display +1234 as well as -1234.
Thank you for your advise! |
|
Back to top |
|
|
RahulG31
Active User
Joined: 20 Dec 2014 Posts: 446 Location: USA
|
|
|
|
Use SIGN LEADING SEPARATE
. |
|
Back to top |
|
|
Time2Live
New User
Joined: 27 Apr 2005 Posts: 43 Location: United States
|
|
|
|
Thank you RahulG31. I shall look that up. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
It's been a long time, but I think SIGN LEADING SEPARATE refers to internal representation of zoned decimal, not an edit format.
Don't you just use the edit format with a "+" at the left end rather than a "-" (the latter forcing a "-" for negative and blank o.w.)? |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2019 Location: USA
|
|
|
|
Phrzby Phil wrote: |
It's been a long time, but I think SIGN LEADING SEPARATE refers to internal representation of zoned decimal, not an edit format.
Don't you just use the edit format with a "+" at the left end rather than a "-" (the latter forcing a "-" for negative and blank o.w.)? |
PIC +...... forces any sign, both '+' and '-' to be explicitly displayed. This is the simplest way to achieve this goal. |
|
Back to top |
|
|
Chetan Kumar
New User
Joined: 03 Dec 2012 Posts: 46 Location: India
|
|
|
|
You can simple use ZZZZZZ.99- edit picture clause. This will display + if positive or - if negative. |
|
Back to top |
|
|
Time2Live
New User
Joined: 27 Apr 2005 Posts: 43 Location: United States
|
|
|
|
Thank you Very Much people! I learned a lot from you all. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
All this, plus floating signs, are in the manual under the PICTURE topic. It includes examples. Why did you not look in the manual in the first place? A quick look-up in the contents and index would have got you the information. |
|
Back to top |
|
|
|