We have a few apps where users need to enter a negative sign along with the amount. To a person, just about everyone who does this tries to enter -1 and the value is received as a positive number. 1- works OK as does using the field - but no one understands field+, field- or field exit keys anymore (Except those still around from the old 5250 terminal days). Has anyone figured out how to let a user enter a -1 and make it work? (other than making the field on the display a character field and then doing all kinds of scans and edits to make sure it's numeric)
dilbernator@xxxxxxxxx 11/3/2006 11:25 AM >>>
With Qry/400 you can tell the PRINTING where you want the negative sign, but the field in a file has the negative indicator in the last (right most nibble) of the number field, for both packed decimal and for zoned numbers. To specify for QRY/400 print, select "Specify report column formatting" and put your cursor on the field you want to print with the negative sign on the left. This field MUST be a number, and not a character field. Press F16 (shift F4). This will give you the "Define Numeric Field Editing" screen. Take edit option 1 (Numeric editing choices) and make sure that you put "Y" in the "Show negative sign" prompt, and fill in the character(s) you want as the negative indicator. I don't know if the negative sign will float, or be fixed. I think you can only float the currency symbol with this way. The other way is to put an edit word or code. The Help for V5R4 says that "Any negative symbol used is on the left of the value for edit codes N through Q, and on the right of the value for other edit codes and edit descriptions." Again, I am not sure if the negative sign floats or not. I don't know if this helps, but good luck. Jim On 11/3/06, Al Mac <macwheel99@xxxxxxxxxxx> wrote: IBM standard for minus values is X,XXX.XX- with a hard minus at the end.
XL does not recognize this as a number ... it needs to be converted
-XXX.XX with the minus floating immediately in front of the digits,
matter how many digits. -X.XX -XX,XXX.XX etc. I want to do that on reports from both Query/400 and RPG, whether to output specifications or through a DDS PRTF, so it is XL-compatible, to
the conversion hassle. Is that doable, how?