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 » ESQL POSITION command - syntax error

Post new topic  Reply to topic
 ESQL POSITION command - syntax error « View previous topic :: View next topic » 
Author Message
Kjell
PostPosted: Fri Nov 05, 2004 3:17 am    Post subject: ESQL POSITION command - syntax error Reply with quote

Acolyte

Joined: 26 Feb 2002
Posts: 73

Hi

I'm struggling with the POSITION command. Look at this piece of cocde:

DECLARE inRec CHARACTER;
DECLARE rLaengd INTEGER;
SET inRec = CAST(InputRoot.BLOB.BLOB AS CHAR CCSID InputRoot.MQMD.CodedCharSetId);
SET rLaengd = POSITION('~' IN inRec FROM 1);

It complains about the POSITION statement: "Syntax error". I do not understand it. What's wrong?

I read elsewhere in this forum that this syntax error could be ignored. This is not true, since I cannot include the flow in a bar-file as long as there are errors.

Anyone?
Back to top
View user's profile Send private message
JT
PostPosted: Fri Nov 05, 2004 7:36 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Kjell,

Not sure if this has any impact on the syntax error you're encountering, but try encasing the BLOB keywords (from the previous statement) in quotes, i.e. InputRoot."BLOB"."BLOB". Can't hurt to try.

I've always seen references to the BLOB domain surrounded with quotes (has to do with it being an ESQL keyword).
Back to top
View user's profile Send private message
jdlennon
PostPosted: Fri Nov 05, 2004 8:41 am    Post subject: ESQL POSITION command - syntax error Reply with quote

Novice

Joined: 07 Oct 2004
Posts: 19
Location: The Villages, FL

I copied your four lines and pasted into a message flow in my WBI MB and all I get is a warning on the preceding line (the one where your reference the CCSID) saying it can not resolve. But, I was able to ignore and deploy. I am pretty up to date on the CSD and also on the Eclipse fixes. SO, other than maybe suggesting you make sure you are up to date on fixes, sorry I can't help you out.
_________________
Jill D Lennon
Back to top
View user's profile Send private message
JohnMetcalfe
PostPosted: Fri Nov 05, 2004 9:32 am    Post subject: Reply with quote

Apprentice

Joined: 02 Apr 2004
Posts: 40
Location: Edinburgh, Scotland

What version of WMQI are you on?

My understanding was that the FROM parameter on the POSITION function was add in WBIMB - we are running on WMQI 2.1 CSD4 and your code gives an syntax error in this version (as I'd expect). Removing the FROM clause fixes this. Try SET rLaengd = POSITION('~' IN inRec) ; - does this work?
Back to top
View user's profile Send private message
brenner
PostPosted: Mon Nov 08, 2004 11:22 pm    Post subject: Reply with quote

Newbie

Joined: 22 Oct 2004
Posts: 7
Location: IBM Hursley

The POSITION function was upgraded in V5. Pre V5 the syntax was
POSITION (search_string IN source_string);

The improved V5 is
POSITION(SearchExpr IN SourceExpr FROM FromExpr REPEAT RepeatExpr);

So, if you are running pre-V5 you should remove the FROM clause.
Back to top
View user's profile Send private message
K_A
PostPosted: Wed Nov 10, 2004 10:47 pm    Post subject: Solved Reply with quote

Apprentice

Joined: 10 Nov 2004
Posts: 32

I DID use the WBIMB toolkit.

I have now upgraded to CSD4 and the problem is gone.
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 » ESQL POSITION command - syntax 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.