|
I think Scott Klement posted something (may have been in the news letter he edits) a while back that does this. The service program he provided is called VALMAIL. The part where it does a look up on the domain name isn't going to work in RPG III but the rest of it should be okay. Also, the routine below has a couple of problems. For example, it would allow "@." as a valid email address when it clearly isn't. You need to have at least a character before the "@", a character before the "." and a character after the "." for it to be valid. Also, double "."'s after the @ symbol are a no-no (I don't know if they're okay before or not) as are spaces outside of comments. Matt -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Holden Tommy Sent: Monday, November 28, 2005 10:11 AM To: RPG programming on the AS400 / iSeries Subject: RE: EMAIL Syntax Validation Shouldn't be too hard for you to convert this to RPG 3... Pos=%Scan('@':EMail); If Pos>0; Pos=%Scan('.':Email:Pos); If Pos>0; If %Subst(Email:Pos+1:3)<>*Blanks; Return *On; EndIf; EndIf; EndIf; Thanks, Tommy Holden -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bob Voltz Sent: Monday, November 28, 2005 8:36 AM To: RPG400-L@xxxxxxxxxxxx Subject: EMAIL Syntax Validation Does anyone have an email syntax validation routine they could post...or point me to a sample somewhere? I just want to make sure it is in a valid format. I don't care if it is a valid address or if the domain exists. Oh....it also has to be in RPG III.....don't ask..... Thanks, Bob Voltz
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.