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 

Alphabet Check

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


Joined: 23 Dec 2002
Posts: 80
Topics: 32
Location: Chennai, India

PostPosted: Thu Jan 04, 2007 8:28 am    Post subject: Alphabet Check Reply with quote

Hi

I have a requirement; to check the names as alphabetic but I need to inlcude some special characters also along with the alphabets like "-"; I have tried this using special names but it's not working; anyother means to handle this; the program is written in COBOL. Please help!
_________________
Thanks,
Vinod.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jan 04, 2007 9:15 am    Post subject: Reply with quote

Quote:

I have tried this using special names but it's not working; anyother means to handle this; the program is written in COBOL


Vinodch,

What exactly do you mean it is not working? You need to specify the error message or explain in detail the problem you are getting. Also Please search before posting. check these links

http://www.mvsforums.com/helpboards/viewtopic.php?t=7111&highlight=alphanum

http://www.mvsforums.com/helpboards/viewtopic.php?t=4451&highlight=accent+characters

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Vinodch
Beginner


Joined: 23 Dec 2002
Posts: 80
Topics: 32
Location: Chennai, India

PostPosted: Thu Jan 04, 2007 11:17 am    Post subject: Reply with quote

Hi Kolusu

I tried the changes suggested; but what happens is even the alphabetic is getting rejected; please mentioned code below:

*----------------------*
ENVIRONMENT DIVISION.
*----------------------*

CONFIGURATION SECTION.
*----------------------*

SPECIAL-NAMES.
CLASS ALPHA-NUM IS 'A' THRU 'Z',
'a' THRU 'b',
'-'.
.
.
.
.
.


IF INP-DTL-PATIENT-FIRST-NAME IS ALPHA-NUM
CONTINUE
.
.
.
.
.
_________________
Thanks,
Vinod.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jan 04, 2007 11:34 am    Post subject: Reply with quote

vinodch,

you are checking 'a' thru 'z' and 'A' thru 'Z' and for '-' only. what happens if the field has spaces?

For ex if INP-DTL-PATIENT-FIRST-NAME is defined x(20) and you moved just 'vinodch' to the field it only occupies 7 bytes and the rest 13 bytes out of 20 are all spaces. In this case your alphabetic check will fail because you are not considering the space as a valid alphabet. Add ' ' also to the Alpha-num list and re-run your program

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Vinodch
Beginner


Joined: 23 Dec 2002
Posts: 80
Topics: 32
Location: Chennai, India

PostPosted: Thu Jan 04, 2007 3:47 pm    Post subject: Reply with quote

Thanks Kolusu. It worked !
_________________
Thanks,
Vinod.
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