RPG/400 alphanumeric field

pts.
Tags:
RPG/400
RPG/400 field validation
How to validate a alphanumeric field that is of length 20 but should not allow values less than 12?

Answer Wiki

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

Hi,

A real “quick and dirty” method is to move (not move left) your 20 long field into a 8 long field and check if the 8 long field is empty. If it’s empty, then your field is too short.

Alternatively you should be able to check if the substring from 13 – 20 is empty. This is a more professional and easier to read way of checking.

Regards,

Martin Gilbert.

Discuss This Question: 2  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.
  • Askt
    sorry can you suggest the same using ile?any syntax available?
    265 pointsBadges:
    report
  • philpl1jb
    if %len(%trim( field20)) < 12 ...
    54,090 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: