× 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.



Ok, let's see what the manual has to say...

Data type/keyboard shift for display files (position 35)

Signed Numeric (S)

Each type of keyboard is shifted to allow numeric entry: uppershift for
the data-entry keyboard and lowershift for the typewriter-like keyboard.
You can only type the numbers 0 through 9 into the field (no blanks, no
plus sign, no minus sign). To leave the field, press the Field Exit key,
the Field+ key, the Field- key, or a cursor movement key. If you do not
type any data into the field, you can press the Enter key.

You should consider the following differences when you choose between
signed numeric (S) and numeric only (Y):

Signed numeric restricts the characters that you can type into the field
to the numbers 0 through 9.
You cannot specify S in position 35 if you also specify the EDTCDE or
EDTWRD keyword.
Numeric-only performs character removal to remove nonnumeric characters;
signed numeric prevents you from typing in these characters at all.
For input-capable fields only, the display length for the field is one
more than the length specified in positions 30 through 34. The farthest
right position on the display is reserved for a minus sign.

The following considerations apply when the OS/400 program passes the
contents of a signed numeric field to your program:

Your program always sees a numeric, right-justified, zero-filled field.
The field is displayed as a right-justified, blank-filled field unless
you specify CHECK(RZ). If you specify CHECK(RZ), the field is displayed
as right-adjusted and zero-filled.
The OS/400 program does not perform decimal alignment.
The OS/400 program does not remove characters from the field (as it does
for numeric only fields).
When an input-capable signed numeric field displays and you do not
specify CHECK(RZ), the OS/400 program performs zero suppression by
default (the EDTCDE and EDTWRD keywords are not valid for signed numeric
fields).

Negative numbers are handled as follows:

On input, you must type the number and press the Field- key. The number
is right-justified in the displayed field with a minus sign in the
farthest right position. The OS/400 program converts the farthest right
significant digit to hex Dn where n is the significant digit, before
passing the number to your program. For example, if you type 12345 and
press the Field- key, 12345- is displayed and your program sees
X'F1F2F3F4D5'.
On output, the OS/400 program converts hex D in the farthest right digit
to hex F. This changes the negative number to a positive number for
display purposes and displays a minus sign in the farthest right
(additional) position in the displayed field. For example, if your
program sees X'F1F2F3F4D5', the number appears on the display as 12345-.
For examples of signed numeric fields, and sample data typed into them,
see Figure 6.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of James H. H.
Lampert
Sent: Friday, November 19, 2010 4:40 PM
To: Midrange Systems Technical Discussion
Subject: Re: negative numbers in Client Access

DeLong, Eric wrote:
Robert, you just need to use a display field edit code that uses the
"-"
symbol for negative values.

That probably doesn't matter, if it's accurately emulating the "Field
Minus" key on a real terminal. My own description of the behavior is
based on observation of an actual InfoWindow II.

--
JHHL

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.