Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to do a e-mail validation in assembler program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: How to do a e-mail validation in assembler program
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Jun 24, 2009 5:05 pm    Post subject: Reply to: How to do a e-mail validation in assembler program
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: 6967
Location: porcelain throne

PostPosted: Wed Jun 24, 2009 5:09 pm    Post subject:
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: 8054
Location: East Dubuque, Illinois, USA

PostPosted: Wed Jun 24, 2009 5:38 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10255
Location: italy

PostPosted: Wed Jun 24, 2009 7:54 pm    Post subject: Reply to: How to do a e-mail validation in assembler program
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    Post subject: Reply to: How to do a e-mail validation in assembler program
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10255
Location: italy

PostPosted: Sat Jun 27, 2009 6:12 pm    Post subject: Reply to: How to do a e-mail validation in assembler program
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    Post subject: Reply to: How to do a e-mail validation in assembler program
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10255
Location: italy

PostPosted: Sat Jun 27, 2009 7:52 pm    Post subject: Reply to: How to do a e-mail validation in assembler program
Reply with quote

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

look at
http://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 ...
http://tools.ietf.org/html/rfc5322
http://tools.ietf.org/html/rfc5321
http://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
http://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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Dump analysis of an assembler module monica1 PL/I & Assembler 4 Tue May 09, 2017 10:05 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Mail via SMTP with an image? Mike 1304 JCL & VSAM 4 Thu Jan 26, 2017 2:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us