|
Sorry, I thought that returning *ON was invalid, my bad. How about if we
used rpower@xxxxxxxxxx
Pos=%Scan('@':EMail); //rpower@ pos=7
If Pos>0;
Pos=%Scan('.':Email:Pos); //stjohns. Pos=15
If Pos>0;
If %Subst(Email:Pos+1:3)<>*Blanks; //sym is equal to blanks due to our
.ca so it would skip this... am I correct?
Return *On;
EndIf;
EndIf;
EndIf;
Return *OFF; //invalid email
Ron Power
Programmer
Information Services
City Of St. John's, NL
P.O. Box 908
St. John's, NL
A1C 5M2
709-576-8132
rpower@xxxxxxxxxx
http://www.stjohns.ca/
___________________________________________________________________________
Success is going from failure to failure without a loss of enthusiasm. -
Sir Winston Churchill
"Holden Tommy" <Tommy.Holden@xxxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
2005/11/28 11:58 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc
Subject
RE: EMAIL Syntax Validation
let's see...
Pos=%Scan('@':EMail); //rpower@ pos=7
If Pos>0;
Pos=%Scan('.':Email:Pos); //nf. Pos=10
If Pos>0;
If %Subst(Email:Pos+1:3)<>*Blanks; //sym is not equal to blanks,
email is valid.
Return *On;
EndIf;
EndIf;
EndIf;
Return *OFF; //invalid email
Thanks,
Tommy Holden
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of RPower@xxxxxxxxxx
Sent: Monday, November 28, 2005 9:19 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: EMAIL Syntax Validation
I would think that that routine would find my home email address
invalid?
rpower@xxxxxxxxxxxxxxx
based on you substring for the first . after the @...??
Ron Power
Programmer
Information Services
City Of St. John's, NL
P.O. Box 908
St. John's, NL
A1C 5M2
709-576-8132
rpower@xxxxxxxxxx
http://www.stjohns.ca/
________________________________________________________________________
___
Success is going from failure to failure without a loss of enthusiasm. -
Sir Winston Churchill
"Holden Tommy" <Tommy.Holden@xxxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
2005/11/28 11:40 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc
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.