We help IT Professionals succeed at work.

iSeries RPGLE %substr length error

Lynn Harris
Lynn Harris asked
on
232 Views
Last Modified: 2017-04-07
I have very simple code to check if the last entry of an email address is a '.' and if it is remove it. If multiple '.' are entered remove them all.

The issue is if my email address exceeds 30 characters. I found other posts if the variables are varying in length or %trim is used. I do neither.  I don't see why this would have an issue. Please see attached for debug display, definitions, etc.  

Thank you. -substr-length-error-.docx
Comment
Watch Question

Consultant
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
THANK YOU!

missed that completely!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.