I've been programming on the 400 since 1988 and this one issue regarding display files continues to remain a mystery...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
to me. Perhaps you, or one of your knowledgeable readers, can finally provide the answer. When I design/code a screen that contains numeric input/output fields, I prefer to use a edit code or word with the field(s) so that the screen displays any initial values in a user friendly fashion. Example: With commas and zero suppressionWhen the user types a new value in the field the editing is lost until the screen is redisplayed. I have no problem with that. However, if the user enters a negative number into the field --using the Field key -- not only is the editing lost, but a non-numeric character appears in the field in place of the "negative" sign that remains there until the screen is refreshed/rewritten. This is very confusing to the user. The best I can ever say to the user is, "Don't use the Field key, and instead place a dash after the keyed numeric value". Surely there must be a better solution than this?
The simple answer is "smoke and mirrors." The keyboard shift"N" in DDS will allow it to be displayed as a minus sign. If you add an edit code, it will not compile, as that keyboard shift will not allow any editing. The best answer is to remap the user's Field Minus key to a real minus key, and leave the shift-field exit set to Field Minus. Most emulators will automatically convert the field.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.
Dig Deeper on RPG iSeries programming
Related Q&A from John Brandt
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.