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 

use of wildcard

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


Joined: 20 May 2004
Posts: 97
Topics: 43
Location: hyderabad, India

PostPosted: Tue Jun 15, 2004 6:35 am    Post subject: use of wildcard Reply with quote

hi all,

how should i use the wildcard charcters so that it matches for exactly one or none character.

thanx in advance
_________________
Priya Ranjan Mohanty
Consultant
Kanbay Software (I) pvt. Ltd.
Hyderabad
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Jun 15, 2004 7:09 am    Post subject: Reply with quote

pzmohanty,

Post detailed information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question.

It Would be helpful if you post an example

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


Joined: 20 May 2004
Posts: 97
Topics: 43
Location: hyderabad, India

PostPosted: Tue Jun 15, 2004 9:33 am    Post subject: Reply with quote

hi kolusu,

my query is something like this:-

1) we know '%' stands for zero or more characters.
2) we also know '_' stands for exactly one character.

what i wanna know is what combination of wildcard to be used so that it represents EXACTLY ONE or NO CHARACTER.

such that if i write "XY?Z" , then the string can be "XYZ" or "XYPZ" or "XYUZ" etc.
the length of the string can be 3 or 4.
if the length of string is 3 , then it should b "XYZ" . but if it is 4 then the string can be any STRING of length 4 with XY being first 2 character & one character(can be any character) & then followed by Z.

I hope this makes the Query pretty clear!!!!!!!!!!

Thanx in advance.
_________________
Priya Ranjan Mohanty
Consultant
Kanbay Software (I) pvt. Ltd.
Hyderabad
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
pzmohanty
Beginner


Joined: 20 May 2004
Posts: 97
Topics: 43
Location: hyderabad, India

PostPosted: Tue Jun 15, 2004 9:44 am    Post subject: Reply with quote

hi kolusu,

let me know if the query is still not clear , so i acn try to make it more clearer.

one more thing i can't use OR, b'coz or is fine if string is small like "XY?Z"

where "?" is to be replaced by some combination of wildcard character.

but what if requirement is string like "XY?ZD?F?WER?MKJ".

thanks,
_________________
Priya Ranjan Mohanty
Consultant
Kanbay Software (I) pvt. Ltd.
Hyderabad
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Jun 15, 2004 10:21 am    Post subject: Reply with quote

Pzmohanty,

Hmm did you look up LIKE predicate? Check this link which explains in detail about the like predicate

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNSQH11/2.21.6?SHELF=&DT=20010718164132&CASE=

Check this link for example of LIKE predicate

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNSQH11/2.21.6.1?SHELF=&DT=20010718164132&CASE=

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
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database 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