View previous topic :: View next topic
|
Author |
Message |
ankit saxena
New User
Joined: 06 Oct 2010 Posts: 55 Location: india
|
|
|
|
how to check if a variable contains only alphabets or it has any special character or commas , fullstop also.
thanks.. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
What's fullstop?
Did you try anything yourself? What happened when you did? |
|
Back to top |
|
|
ankit saxena
New User
Joined: 06 Oct 2010 Posts: 55 Location: india
|
|
|
|
actually i want to check whether t DSN name given by a user is proper or not for this i need to check whether it is free from any spl character apart from scope terminator (.) ,
but i m not getting any logic ... as to how to check. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Get the EBCDIC ranges of the permitted characters; check each character in the purported DSN for these values (I'm not a COBOL programmer, but surely it has built-in functions like VERIFY, yes?). |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You might consider defining a 1-byte working-storage field that has an 88-level that includes all of the valid values for your process.
Then compare each input byte against this (in a loop using reference modification, indexing, or subscripting). . . |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
Back to top |
|
|
|