|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
ESQL - index error when index used in call procedure |
« View previous topic :: View next topic » |
Author |
Message
|
EgilsJ.Rubenis |
Posted: Thu Apr 05, 2007 12:47 am Post subject: ESQL - index error when index used in call procedure |
|
|
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 |
|
 |
fjb_saper |
Posted: Thu Apr 05, 2007 3:11 am Post subject: |
|
|
 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 |
|
 |
EgilsJ.Rubenis |
Posted: Mon Apr 09, 2007 11:52 pm Post subject: |
|
|
Acolyte
Joined: 18 Nov 2002 Posts: 63 Location: Germany, Alfeld
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|