MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Split email field into two tokens

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
me_naveen
Beginner


Joined: 21 Dec 2007
Posts: 23
Topics: 12

PostPosted: Thu Jun 28, 2018 8:10 am    Post subject: Split email field into two tokens Reply with quote

Hi,

Would it be possible to split the below special email string ( Ex: size is 50 characters) in COBOL.

email string = "splspl@spl@matrix.com"


local token ==> "splspl@spl
domain token ==> matrix.com"


Split is required using the 2nd '@' symbol before the domain token.

If we have only one @ symbol we could implement using inspect verb easily.
But,in this case we have 2 @ symbols in email string.

Please guide me if we have a chance to split using INSPECT or any other verb.

Thanks in advance.
nav.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Jun 28, 2018 10:42 am    Post subject: Reply with quote

me_naveen,

Please search before posting. INSPECT REVERSE for @ will give you what you need

see the 8th post by me in this topic

https://www.mvsforums.com/helpboards/viewtopic.php?t=10586&highlight=reverse

https://www.mvsforums.com/helpboards/viewtopic.php?t=10820&highlight=reverse
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
me_naveen
Beginner


Joined: 21 Dec 2007
Posts: 23
Topics: 12

PostPosted: Fri Jun 29, 2018 1:42 am    Post subject: Reply with quote

Yes. It is working fine.

Thank You Kolusu.


Thanks,
Nav.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group