Okay, Client Access behaves in the same manner. Here's the problem:
Behavior according to IBM CA/MochaSoft 5250/Synapse WinAPPC:
(I've just tested, and it happens on a 'Memorex Telex' dumb terminal as well)
- Digits in number-only field are not right-justified when Field Exit is
pressed.
- Field- causes the last byte of the field to be changed to a '}', which is
the same as an EBCDIC '0' which has been zone-shifted to indicate that the
field is negative. This causes blank space in the middle of the field.
- Manually right-justifying field, then pressing Field- on the last digit
causes the last digit to be replaced with '}', regardless of what the last
digit might have been prior. In other words, ' 1234' then pressing
Field- results in ' 123}', which *should* mean -1230.
- Entering '1234 ' and pressing Field- causes a local error when you press
Enter, (invalid digits or number of decimals or some such). That's because
the field looks like this: '1234 }'. You can only enter digits right-
flush with the signed digit. Like this ' 1234}'.
Behavior according to our 5250 emulator:
- Digits in number-only field are right-justified when Field Exit, Field+ or
Field- is keyed.
- After that, if the key was Field-, we shift the last digit of the field if
and only if that digit is a numeric digit (it could technically be one of
",", ".", blank, or NUL, or the shifted digit from a previously keyed and
Field-'d value).
- After that, if the key was Field+, we 'unshift' the last digit - if it was
just Field Exit, we do not touch the last digit. (Since Field Exit clears
the rest of the field before right-justifying the value, as do Field- and
Field+, Field Exit will work like Field+ 95% of the time - they behave
differently for 'signed-numeric' fields.)
- Manually right-justifying the field has no affect on the result of the
operation.
... and the biggie ...
- AS/400 complains loudly when we try to transmit the data in the field as-is.
Behavior according to the specs (pretty close to our behavior):
(This is from memory, as I don't have the spec on me at the moment)
- The spec does not specify whether number-only fields should be right-
justified when Field-, Field+, or Field Exit is pressed. It does specify
that signed-numeric fields should be right-justified.
- The spec claims that the last position of the field should be zone-shifted
*if it is a numeric digit*. It is clearly against the spec for IBM CA to
replace the last position with a '}' when the last position is a NUL.
- The spec does not state that Field+ should unshift the last digit.
- The spec does not note any difference in the way number-only fields should
be transmitted as opposed to other fields. The spec *does* note that the
last digit (the sign position) of *signed-number* fields should be truncated
and the second-to-last digit should be shifted. In effect, we are
transmitting number-only fields in the *exact* same format as signed-number
fields, just that we perform the sign translation on the screen for
number-only fields and perform it during transmit for signed-number fields.
My conclusion:
- The spec is wrong. We should emulate CA and the dumb terminal and put a '}'
at the last position of the field on Field-, regardless of what the field
contains. We should probably just transmit the field like that as well.
- We should still right-justify the digits, even though no-one else does.
Otherwise, entering negative numbers is awkward (you have to count how many
positions the number is, cursor over, and enter it right-flush, then press
Field-)
Any objections, particularly from users? Does this all seem correct, oh mister
bug-submitter (I've forgotten who that was - Sean, maybe?)
-Jay 'Eraserhead' Felice
And that concludes my list spamming for today ;)
+---
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to [EMAIL PROTECTED]
| To subscribe to this list send email to [EMAIL PROTECTED]
| To unsubscribe from this list send email to [EMAIL PROTECTED]
| Questions should be directed to the list owner/operator: [EMAIL PROTECTED]
+---