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 

Maximum length of string we can give in IN predicate

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


Joined: 12 May 2006
Posts: 10
Topics: 6
Location: india

PostPosted: Wed Sep 19, 2007 11:50 am    Post subject: Maximum length of string we can give in IN predicate Reply with quote

hi,

i have a scenario where i need to pass the String of length 2000 bytes
in IN predicate of the SELECT statement

when i am doing the same i am getting SQLCODE = -134

can anyone tell me what is the maximum length of string i can give in IN predicate

Is there any way i can resolve this problem

thanks
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Sep 19, 2007 11:55 am    Post subject: Reply with quote

rameshb,

How are you passing the String? ex:
Code:

ws-pass-string   pic x(2000) value 'abcdefghijk....... 2000 byte'

and using that in select statement?

Code:

select * from table where column in :ws-pass-string


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


Joined: 12 May 2006
Posts: 10
Topics: 6
Location: india

PostPosted: Wed Sep 19, 2007 1:28 pm    Post subject: Reply with quote

i am passing through host variable

IN(ASN_STRG) like this where ASN_STRG is host variable

this host variable is coming like ABCDE,QBC,WER,....... LIKE THIS
Back to top
View user's profile Send private message
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Thu Sep 20, 2007 2:09 am    Post subject: Reply with quote

rameshb,

It looks like there is a mismatch in the column data type and host variable structure that you are trying to use in your IN predicate.

If your column data type is VARCHAR, check that your host variable structurs is compatible. Trust you know the kind of host variable structure used for VARCHAR and you have a DCLGEN.

HTH...Regards,
Manas
_________________
There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948)
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
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