Use Edit Codes N - Q to have a leading minus (-) on numeric fields with negative values. This will float to the first position of the field after any zeros are suppressed. It is available in RPG, DDS & Query. In Query, use F16 on the report column formating panel for the numeric field and specifiy Edit Code. Jeff Young Sr. Programmer Analyst Dynax Solutions, Inc. A wholly owned subsidiary of enherent Corp. IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions V5R2 IBM Certified Specialist- e(logo) server i5Series Technical Solutions Designer V5R3 IBM Certified Specialist- e(logo)server i5Series Technical Solutions Implementer V5R3 ----- Original Message ---- From: Jim Essinger <dilbernator@xxxxxxxxx> To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> Sent: Friday, November 3, 2006 11:25:52 AM Subject: Re: Minuses RE: Columns in printouts 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 to -XXX.XX with the minus floating immediately in front of the digits, no 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 reduce the conversion hassle. Is that doable, how?
This mailing list archive is Copyright 1997-2015 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact