This is a clip from the V5R4 "DDS for Display Files" manual.
Negative numbers are handled as follows:
The user can type a negative number on input in one of two ways:
1.) Type the digits, then a minus. The minus sign (-) appears (hex 60) on
the display where it was typed in.
2.) Type the digits, then press the Field- key.
If you do not specify CHECK(RZ) or CHECK(RB), a brace (}) is displayed in
the farthest right position.
-----Original Message-----
From: Booth Martin [mailto:booth@xxxxxxxxxxxx]
Sent: Wednesday, December 08, 2010 9:44 PM
To: RPG programming on the IBM i / System i
Subject: Enter minus and the } character
I am not sure that what I am seeing is what I think I am seeing. Maybe
it has always been like this, but this seems like new behavior.
I have a DSPF with a 5/0 in a numeric field.**
**
ADDDAYS 5Y 0B 16 19EDTCDE(N)**
**
It worked just fine, and when Enter(-) was keyed, I would see the } at
the right side. It is what I expected.
I then changed a line of code up above, unrelated to this field, and the
screen would no longer compile. I tried various EDTCDE()s and finally,
in desperation I tried**
**ADDDAYS 5S 0B 16 19
Well didn't my socks fall off! It compiled fine, then I tried it out
and Enter(-) gave me the field with the number followed by an ordinary
minus sign ( no } ). It had not been processed; it behaved just like it
always has, except for displaying the number properly.
Has it always been like this, and I didn't realize it?
http://www.martinvt.com/Code_Samples/Date_Math/date_math.html is where
it happened, if you want to look at it
****
As an Amazon Associate we earn from qualifying purchases.