RPGLE validation

Tags:
RPGLE
How can I do a validation like first 3 words character and next 5 must be number in RPGLE?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 4  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.
  • ToddN2000
    Sounds like homework. You can do this a number of ways. What code have you tried? You could substring the data and test it. load it to a data structure with the first 3 and next 5 positions. Can you use SQL?
    134,585 pointsBadges:
    report
  • philpl1jb

    Here is one way .. there are many others.

    Invalid = *off;

    Select;

      When %subst( word : 1 : 1 ) < 'A' or %subst( word : 1 : 1 ) > 'Z' ;

          Invalid = *on;

      When %subst( word : 2 : 1 ) < 'A' or %subst( word : 2 : 1 ) > 'Z' ;

          Invalid = *on;

    You can just continue like that.

    54,090 pointsBadges:
    report
  • Vishalsuryavanshi
    I have to do it for employee iD in physical file. And that physical file is use in RPG le program for simple add employee details program. So please provide me clarification.
    15 pointsBadges:
    report
  • ToddN2000
    Are special char allowed? You could substring out the numeric portion and test it with a TESTN opcode. As for the other portion are numbers not allowed in that portion just letters from A to Z?
    134,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.

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

Following

Share this item with your network: