IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to do a e-mail validation in assembler program


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
t_ctaram

New User


Joined: 15 May 2007
Posts: 20
Location: mumbai

PostPosted: Wed Jun 24, 2009 4:44 pm
Reply with quote

Hi all,

i need to do a e-mail validation using the assembler code. could any one please help me with the initail validation logic.

I will get a E-mail (eg. abc@yahoo.com) as an input and i need to validate it in the assembler language and tell that its a valid e-mail format or not.

Sitaram
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Jun 24, 2009 5:05 pm
Reply with quote

If you're going to be writing in Assembler, please review the TRT (Translate and Test) instruction in the "Principles of Operation" manual.

TRT's are used in COBOL (under the covers), for NUMERIC validation, some forms of INSPECT, the ALPHABETIC and ALPHANUMERIC class test and many other scenarios.

You could also use a BCT loop, which is similar to a COBOL In-Line PERFORM.

Do you have any Assembler experience?

Regards,
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 24, 2009 5:09 pm
Reply with quote

do you want to validate the e-mail
or
do you want to validate the format of e-mail send-to address?

I assume you want to validate the format of the e-mail address.

I would first search the IBM site and then general google.

IBM may have a routine that you could CALL that would perform e-mail address validation.

I am sure that there are about a gazillion JAVA routines.

Maybe someone has already coded an assembler routine that you could find thru google.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jun 24, 2009 5:38 pm
Reply with quote

Google is your friend. Googling email address validation returns over 8 million hits. Why reinvent the wheel if you don't have to (I know, expat, a futile question around here)?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jun 24, 2009 7:54 pm
Reply with quote

have You devised the logic yet ??
the logic does not depend on the programming language

searching for
"email address validation rules" will return links to the logic
and for
"email address validation C" will return links to c language samples
Back to top
View user's profile Send private message
t_ctaram

New User


Joined: 15 May 2007
Posts: 20
Location: mumbai

PostPosted: Sat Jun 27, 2009 6:05 pm
Reply with quote

hi all,

i am looking for validating the format of the e-mail using assembler language. i have come up with a Pseudo code for the as below:

• Special Character validation must include only “@” and “.”
• Email id cannot start with _ or @
• Email id can include a-z, A-Z , 0-9, -_, @ and .
• The name part excludes any character other then a-z, A-Z, 0-9, .(dot), _(Underscore).
• The @ or . Character should not precede or follow each other when the user is entering data against the email and confirm email address fields.
• The email ID must end with 2-4 chars( example: john@yahoo.com , john@yahoo.ca , john@something.info )"

i also google is my first priority for serching generic codes. but i have not found any coding in assembler for my requirement.

If any one of you can help me in coming up with a routine which this validation, it would be of great help.

Thanks,
Sitaram
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Jun 27, 2009 6:12 pm
Reply with quote

why assembler ??
it looks like You are not comfortable with it

but just show what You have come up with and somebody will be here to help
Back to top
View user's profile Send private message
t_ctaram

New User


Joined: 15 May 2007
Posts: 20
Location: mumbai

PostPosted: Sat Jun 27, 2009 6:47 pm
Reply with quote

i have no choice ... i need to code it in assembler icon_sad.gif

i was trying using TRT instruction for alfpha numeric validation as well for validating "_","." and "@"

Your guidance would really help me in speeding up my coding..

thanks,
Sitaram
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Jun 27, 2009 7:52 pm
Reply with quote

rereading the whole thing, it looks like You are oversimplifying things...

look at
en.wikipedia.org/wiki/E-mail_address#RFC_specification
for quick and dirty specifications

for more professional approach search and meditate on the proper RFC ( internet community documents on standards )
like ...
tools.ietf.org/html/rfc5322
tools.ietf.org/html/rfc5321
tools.ietf.org/html/rfc3696

but using the wikipedia info is enough for simple approach ( I recommend to refine it by implementing the proper standards )

here an additional link
www.dominicsayers.com/isemail/

and remember RFC philosophy is ....
strict with what You send, liberal with what You receive
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top