× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Mark,

What kind of numeric value is 5-6? Is that supposed to be a fraction?
Perhaps it's supposed to be lbs-ozs to represent a weight? The format
is incorrect, but each of the entered characters is valid for a numeric
field. 56- or -56 would be valid numeric values. Display management is
doing its best to make sense of nonsensical input, and so disregards the
minus characters in the middle of a value...

I suspect this is working as designed.

-Eric

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of J M Plank
Sent: Wednesday, March 24, 2010 8:48 AM
To: RPG programming on the AS400 / iSeries
Subject: Dashes in the middle of a number being ignored

We have an application that reads a scale weight with a device and then
an
RPG program prints a label. The user can also manually input the
weight.
In testing, we discovered that dashes/minus signs can be input in the
middle
of the number, but are ignored in the program. So 5-6 will be seen as
56
and 45--6 will be 456.

We're running V5R4. The DDS code is:
A $SCALEWGT 7 2B +2
A EDTCDE(4)
A DSPATR(PC)

The /free code is:
Write MSSLBBL09;
ExFmt MSSLBBL09;

In debug, the very next statement displays 5-6 as 56.

Is this normal behavior? Every other key combination we tried (letters,
*,
!, =, &) caused an input inhibited error. Does the system ignore a
dash/minus sign except at the end of the number?

Mark Plank

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.