RPG/400 alphanumeric field

0 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?
ASKED: November 25, 2008  1:17 PM
UPDATED: June 20, 2013  7:40 PM

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.

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