How to automatically clear the remaining of a numeric input field with pressing field exit

0 pts.
Tags:
RPG
My screen has a input field where the length is 7,0. It has a default value of 50 and the user enter 91 at the beginning of the field and press accept function key. The return value to the program becomes 9100050. Is there any DDS keyword that I can use to avoid this problem? Thanks
ASKED: June 7, 2005  3:03 PM
UPDATED: October 26, 2009  3:55 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

use CHECK(RZ) in the DDS and the user will have to hit the field exit in order to proceed.

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Bdfgsbw
    You can also use CHECK(RB): Right-adjust, blank-fill. The difference is that CHECK(RB) will put blanks before the number when the user hits field exit. CHECK(RZ) will put zeros before the number when the user hits field exit. Either keyword will work even if your field is defined as numeric.
    0 pointsBadges:
    report
  • Sholmbe
    Neither CHECK(RZ) nor CHECK(RB) will prevent a user from Tabbing out of a field. Per IBM: The following list shows programming considerations for CHECK(RB) and CHECK(RZ): - You activate right-alignment only by pressing the Field Exit, the Field+, or the Field- key. If you use the cursor movement keys to exit from a right-aligned field, the field is not right-aligned; it is left as is. - Right-aligned fields longer than 15 character positions slow keyboard entries. - The Dup key fills a right-aligned field from the cursor location to the end of the field with the duplication character, but the field is not right-aligned. - You cannot specify the CHECK(RB) or CHECK(RZ) keyword on a field containing the WRDWRAP keyword.
    40 pointsBadges:
    report
  • TomLiotta
    Although users may use cursor movement keys to exit a field, the value that is left in the field on screen provides the user with visual evidence of a wrong value. Field-exit at least sets a clean value, and it's visible. You will never prevent a user from entering wrong characters. Note that the OP hasn't shown the field DDS yet. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following