|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
ERROR ON DB LOOP-UP : SIMPLE BUT INTERESTING!!!!!! |
« View previous topic :: View next topic » |
Author |
Message
|
asamanta |
Posted: Fri Nov 07, 2003 7:05 am Post subject: ERROR ON DB LOOP-UP : SIMPLE BUT INTERESTING!!!!!! |
|
|
Novice
Joined: 20 Aug 2003 Posts: 18
|
I tried with the following below options inside a function
-- DB look up for CHAR1 & CHAR2
SET Environment.Variables.Data[] = (SELECT T.CHAR1,T.CHAR2 FROM Database.ARDH AS T WHERE T.MS = 'BIL');
OR
SET OuputRoot.NEONMSG.Data[] = (SELECT T.CHAR1,T.CHAR2 FROM Database.ARDH AS T WHERE T.MS = 'BIL');
SET OuputRoot.NEONMSG.Data = NULL;
Both the above conditions give WMQI errors when i use this inside the function.However, i send these reference value to the (function domain)function by reference. Outside the function this code works fine and i am using also
I would be oblighed if anybody can give any clue, where these code go worng when i use this inside the function. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Nov 07, 2003 7:16 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You have to pass in references to Environment and OutputRoot. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
asamanta |
Posted: Sat Nov 08, 2003 6:33 am Post subject: SELECT ERROR |
|
|
Novice
Joined: 20 Aug 2003 Posts: 18
|
DECLARE rEnvVar REFERENCE TO Environment.Variables.Data[];
CREATE FUNCTION FnXYZ('val' CHAR,rEnvVar REFERENCE) RETURNS CHARACTER
BEGIN
BEGIN
DECLARE rEnvVar1 REFERENCE TO rEnvVar.Data1[];
DECLARE sCHAR1 CHARACTER;
DECLARE sCHAR2 CHARACTER;
SET rEnvVar1.FnI[] = (SELECT T.CHAR1,T.CHAR2 FROM Database.ARDH AS T WHERE T.ABS ='val' );
SET sCHAR1 = rEnvVar1.FnI[1].CHAR1;
SET sCHAR2 = rEnvVar1.FnI[1].CHAR2;
RETURN sCHAR1;
END;
Can anyone help me where this is wrong????
It gives error like: "The dynamic field reference supplied to the SET statement does not resolve to a non-list field in a modifiable message tree. The dynamic field reference supplied to the SET statement must resolve to a non-list field in a modifiable message tree. Ensure that only non-list references to modifiable trees are passed to the SET statement." |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Nov 08, 2003 2:17 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
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
|
|
|
|