|
Scott, In the msf journals I have one field containing several data elements. I have to strip out the email address which "generally" starts in the same place. The problem is that an acceptance and a rejection may have the same email address, however one may have put the <...> around it. I am trying to strip it down to the basics so that they look the same. Then I am going to use SQL to find sends without either an acceptance or a rejection. Bad enough I am using a UDF to strip out the email. Using a UDF to validate domain names via your method may get even slower. Sample data DSPJRN JRN(QZMF) RCVRNG(*CURCHAIN) OUTPUT(*OUTFILE) OUTFILE(QTEMP/ZMFSTUFF) ENTDTALEN(512) select joesd from qtemp/zmfstuff ROBS1 ROB 113643QZMFSLOGEID 10324120401121524110000001142 *EH SNDMAIL TO MSF ROBS1 ROB 113643QZMFSLOGEID 10324120401121524110000001142 *E1 O POSTMASTER@xxxxxxxxxxxxxxxx ROBS1 ROB 113643QZMFSLOGEID 10324120401121524110000001142 *E2 R ROB@xxxxxxxxxxxxxxxx ROBS1 ROB 113643QZMFSLOGEID 10324120401121524110000001142 *EX /TMP/EMHDR774.TXT ROBS1 ROB 113643QZMFSLOGEID 10324120401121524110000001142 ET MSG SIZE 398 ROBS1 ROB 113643QZMFACRT1ID 10324120401121524110000001142 QMSF QMSF 110492QZMFSLOGPID 10324120401121524110000001142 *P2 R SMTP MsgFwd ROB@xxxxxxxxxxxxxxxx QMSF QMSF 110492QZMFXLOGCID 10324120401121524110000001142 *C6 FWD TO QTMSOUTQ QMSF QMSF 110492QZMFXLOGCID 10324120401121524110000001142 *C1 O POSTMASTER@xxxxxxxxxxxxxxxx QMSF QMSF 110492QZMFXLOGCID 10324120401121524110000001142 *C2 R <ROB@xxxxxxxxxxxxxxxx> QMSF QMSF 110492QZMFBIGE2ID 10324120401121524110000001142 000010000100000 QTSMTPCLTPQTCP 113602QZMFXLOG8ID 10324120401121524110000001142 *8B QTMSOUTQ TO CLNT QTSMTPCLTPQTCP 113602QZMFXLOG8ID 10324120401121524110000001142 *88 DLVED 10.10.1.141 QTSMTPCLTPQTCP 113602QZMFXLOG8ID 10324120401121524110000001142 *82 R <ROB@xxxxxxxxxxxxxxxx> with T1 (Tranid, Subtype, joesd, emailaddress) as (select substr(joesd,39,29), substr(joesd,70, 2), joesd, stripemail(joesd) from qtemp/ZMFSTUFF where substr(joesd,70, 2) = 'P2' ), T2 (Tranid, Subtype, emailaddress) as (select substr(joesd,39,29), substr(joesd,70, 2), stripemail(joesd) from qtemp/ZMFSTUFF where substr(joesd,70, 2) IN('82', '83') ) select T1.Tranid, T1.Subtype, t1.joesd from T1 exception join T2 on T1.Tranid=T2.Tranid and t1.emailaddress=t2.emailaddress Rob Berendt -- "All creatures will make merry... under pain of death." -Ming the Merciless (Flash Gordon) Scott Klement <klemscot@xxxxxxxxxxxx> Sent by: midrange-l-bounces@xxxxxxxxxxxx 01/12/2004 01:27 PM Please respond to Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> To Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> cc Fax to Subject Re: What are the valid characters in an email address? As you've probably noticed, there are two parts to an e-mail address. The "user" part (actually, I think the RFCs refer to it as the "local part") and the domain part. For example: user@xxxxxxxxxxx user = user part example.com = domain part. The rules for the user part of the address should be as relaxed as possible. The original standards in RFC 822 did limit the valid characters, but newer documents state that ANY character should be allowed in the local part aside from comma, space and the @ symbol. And, even those can be allowed if the local-part appears in quotes. The domain part has to be a valid internet domain name. Rather than try to figure out the characters that are or are not allowed, I recommend just doing a DNS lookup. I wrote an article on validating e-mail addresses in the Nov 13, 2003 issue of the Club Tech Programming Tips Newsletter over on the iSeries Network. (A free associate membership will enable you to read it) http://www.iseriesnetwork.com/resources/clubtech/index.cfm?fuseaction=ShowNewsletterIssue&ID=17632 If for some reason you can't sign-up for the iSeries Network, contact me off-list and I'll send you the source code (but not the article) for the e-mail validator. On Mon, 12 Jan 2004 rob@xxxxxxxxx wrote: > > What characters are valid in an email address? > > - or - > > What characters are invalid in an email address? > > Rob Berendt > -- > "All creatures will make merry... under pain of death." > -Ming the Merciless (Flash Gordon) > _______________________________________________ > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list > To post a message email: MIDRANGE-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/midrange-l > or email: MIDRANGE-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-l. > _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.