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 - index error when index used in call procedure

Post new topic  Reply to topic
 ESQL - index error when index used in call procedure « View previous topic :: View next topic » 
Author Message
EgilsJ.Rubenis
PostPosted: Thu Apr 05, 2007 12:47 am    Post subject: ESQL - index error when index used in call procedure Reply with quote

Acolyte

Joined: 18 Nov 2002
Posts: 63
Location: Germany, Alfeld

Hi,

my Problem is, when using an index for an output field in a call procedure in a while do, that the index seems to contain a character value.

Code that works fine if done in two steps (first convert, then set output):

while intIdx < intTotal
call convertDate (refIn.Table[intIdx].Date, chrConvDate);
Set refOut.Table[intIdx].Date = chrConvDate;
intIdx = intIdx +1
end while;

create procedure convertDate (IN InDate CHAR, OUT OutDate CHAR)
begin
SET OutDate = SUBSTRING(InDate From 7 FOR 2) || '.'
||SUBSTRING (InputDate From 5 FOR 2) || '.' || SUBSTRING(InputDate
From 1 FOR 4);
end;

Using the output field directly in the call

call convertDate (refIn.Table[intIdx].Date, refOut.Table[intIdx].Date)

it happens that the index in the output seems to be trash, what i don't understand because it works fine for the input field with the index in the same call.

Any Ideas? Thanks

Cheers, Egils
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Thu Apr 05, 2007 3:11 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You have set up your ESQL as
convert_date(IN myin CHAR, OUT myout CHAR)

You should have use
convert_date(IN myin REFERENCE, OUT myout REFERENCE) because you are not passing a field but a reference to a field...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
EgilsJ.Rubenis
PostPosted: Mon Apr 09, 2007 11:52 pm    Post subject: Reply with quote

Acolyte

Joined: 18 Nov 2002
Posts: 63
Location: Germany, Alfeld

Thanks,

Cheers, Egils
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL - index error when index used in call procedure
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.