ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CHECK(RB) on a character field not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CHECK(RB) on a character field not working

    I've been trying to use CHECK(RB) on a character field, but it doesn't seem to work. If the declared char field is 5 in length and I only enter 1 value then press Enter, I get an error of Enter key not allowed in field. I'm quite certain that I'm declaring CHECK(RB) where I should declare it but somehow I am missing something.

    In my RPGLE program, I use %CHECK and trim to check whether the values enter in the character field are numeric (i made the field character type because that's the requirement). Could the %CHECK and %trim be at fault why CHECK(RB) is not working?

  • #2
    Re: CHECK(RB) on a character field not working

    Originally posted by hockeygrl
    I've been trying to use CHECK(RB) on a character field, but it doesn't seem to work. If the declared char field is 5 in length and I only enter 1 value then press Enter, I get an error of Enter key not allowed in field. I'm quite certain that I'm declaring CHECK(RB) where I should declare it but somehow I am missing something.

    In my RPGLE program, I use %CHECK and trim to check whether the values enter in the character field are numeric (i made the field character type because that's the requirement). Could the %CHECK and %trim be at fault why CHECK(RB) is not working?

    When you enter the character, press the field exit key. This will right adjust blank fill it on the screen.

    Goo Luck
    Bill
    Bill
    "A good friend will bail you out of jail,
    A true friend would be sitting beside you saying,
    'Wow, that was fun.'"

    Comment


    • #3
      Re: CHECK(RB) on a character field not working

      I actually do press a Field Exit (ENTER key) and that's also the time that I get the error, Enter key not allowed in field. I also declared CHECK(FE) for the field, but I've been using it in a lot of my DSPFs and it's never been a problem when paired with CHECK(RZ) so I don't think it should be a problem when paired with CHECK(RB).

      Comment


      • #4
        Re: CHECK(RB) on a character field not working

        Field Exit and Enter ARE NOT the same thing. The Field Exit key is (normally) the key to the right of the 6 & 9 keys on the numeric keypad. Try that.
        "Time passes, but sometimes it beats the <crap> out of you as it goes."

        Comment

        Working...
        X