Interesting! Yes I could possibly replace '>,' with '>~', then use SSUB based 
on ~ as a delimiter!   That's a clever idea and I might go with that if I don't 
hear anything better!

Karen


 

 

-----Original Message-----
From: Richardson, Jeff <[email protected]>
To: karentellef <[email protected]>
Sent: Thu, Oct 22, 2015 12:58 pm
Subject: [RBASE-L] - RE: Help with parsing email addresses?



I’m not well acquainted with RMAIL or the SSUB command, but I was thinking 
about your problem as I am always challenged with parsing problems…
 
If those are your only three cases, could you check the data for the character 
“>” and then when it is contained in the data could you do a SRPL command, 
temporarily change the delimit, and run your SSUB command?
 
Something like the untested code below:
 
SET vdata = <data you want parsed>
IF vdata CONT ‘>’ THEN
SET vdata = (SRPL(.vdata,’>,’,’>~’,0))
SET DELIMIT = ~
*SSUB command here
SET DELIMIT = ,
ELSE
*SSUB command here
ENDIF
 
Just an idea.
 
 
 
From: [email protected] [mailto:[email protected]]On Behalf Of Karen Tellef
Sent: Thursday, October 22, 2015 12:45 PM
To: Richardson, Jeff <[email protected]>
Subject: [RBASE-L] - Help with parsing email addresses?
 
Converting older RMail code into new RMail code.  One of the things I have to 
do is parse email addresses into individual RMail commands.  I have no real 
control over how it's getting to me.

If all data was like this, I could obviously parse using SSUB:
    [email protected], [email protected]

Some of the data comes in with the "names" as part of the address.  Again, this 
would be easy, use SSUB
    karen tellef <[email protected]>, mary smith <[email protected]

But guess what...  Some of the names actually have a comma embedded:
    tellef, karen <[email protected]>, mary Smith <[email protected]>


Sigh...   Any suggestions on how I could program to get this into 2 lines for 
an RMail send?

Thanks much!

Karen




Reply via email to