ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » BIP2496E:Illegal data type for target Error

Post new topic  Reply to topic
 BIP2496E:Illegal data type for target Error « View previous topic :: View next topic » 
Author Message
new_to_wmb8
PostPosted: Fri Dec 06, 2013 1:18 am    Post subject: BIP2496E:Illegal data type for target Error Reply with quote

Centurion

Joined: 28 May 2013
Posts: 127
Location: Hyderabad, India

Hi i am getting below error when using CARDINALITY from SELECT Statement from DB.

ERROR :
Quote:

BIP2496E: (.READ_DATA_FROM_STARS_DB_MF_Compute.Main, 19.7) : Illegal data type for target. A non-list field reference is required.

The expression supplying the target must evaluate to a value of a suitable type. The given expression cannot possibly do so.


Code:

DECLARE i INTEGER 1;
DECLARE InputCount INT;

SET Environment.dbquery =  ('SELECT * FROM sap');
SET InputCount = CARDINALITY(Environment.dbquery[]);
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Dec 06, 2013 2:53 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

have you taken a usertrace and looked to see what is happening?

Then there are one probably two problems with your code.

Take a look at the way cardinality is used in the CopyMessageHeaders procedure that is created for you when you first open a compute node for ESQL editing.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
new_to_wmb8
PostPosted: Fri Dec 06, 2013 4:48 am    Post subject: Reply with quote

Centurion

Joined: 28 May 2013
Posts: 127
Location: Hyderabad, India

i found the error in writing the esql code ,

Quote:
SET Environment.dbquery = ('SELECT * FROM sap');


it should be like ,
Quote:
SET Environment.dbquery[]= PASSTHRU('SELECT * FROM sap');


now its wokring.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » BIP2496E:Illegal data type for target Error
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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.