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 Function with ROW-Return-value

Post new topic  Reply to topic
 ESQL Function with ROW-Return-value « View previous topic :: View next topic » 
Author Message
mark.luebinski
PostPosted: Mon Feb 26, 2007 9:48 am    Post subject: ESQL Function with ROW-Return-value Reply with quote

Acolyte

Joined: 27 Mar 2006
Posts: 56

Dear masters,

I would like to return ROW-Type as result of FUNCTION oder PROCEDURE in ESQL.

In editor it is all OK. But if I deploy my code, I get:

BIP2402E: (de.deutscherring.wbimb.lv.db_mappings.LV_StagingArea_beschreiben_ExtractTarife.getTarif, 1.60): Syntaxfehler: 'keyword Row'.

My function was inside and outsind module and is VERY simple:

CREATE FUNCTION getTarif( vp_nummer INT ) RETURNS ROW
BEGIN
DECLARE result ROW;
SET result = ROW( Environment.Variables.SCHL_BEGR AS SCHL_BEGR,

...
RETURN result;
END;

What did I making wrong?

Thank you very much!!

Mark
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Feb 26, 2007 9:54 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can't do this, I think.

I think you can return a reference, though.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Feb 27, 2007 9:58 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Jeff is correct. Functions and Procedures in ESQL cannot return ROWs or LISTs.


Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
mark.luebinski
PostPosted: Thu Mar 01, 2007 8:11 am    Post subject: Reply with quote

Acolyte

Joined: 27 Mar 2006
Posts: 56

Dear Masters,

my toolkit-hint was, that it is possible, so I tried the ROW.
But if I now try to use REFERENCE it doesn't work.

CREATE LASTCHILD OF OutputRoot.MRM NAME 'GRTK2Y4';
MOVE tarifZeiger LASTCHILD;
getTarif(2, tarifZeiger);

Toolkit shows "Syntax Error".
Procedure is:

CREATE PROCEDURE getTarif( IN vp_nummer INT, INOUT zeiger REFERENCE )
BEGIN
DECLARE result ROW;
SET result = ROW(
Environment.Variables.SCHL_BEGR AS SCHL_BEGR,
...
);
SET zeiger = result;

END;

What is wrong here?

Thank you very much!!!

Mark
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Mar 01, 2007 8:14 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can't assign a ROW to a reference.

I don't know for sure that you can do this, but you can try:
Code:
Declare myRef REFERENCE to result;
set zeiger = myRef;


You might be better off just doing
Code:
set zeiger=ROW(
Environment.Variables.SCHL_BEGR AS SCHL_BEGR,
...
);

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mark.luebinski
PostPosted: Fri Mar 02, 2007 5:03 am    Post subject: Reply with quote

Acolyte

Joined: 27 Mar 2006
Posts: 56

Hi jefflowrey,

could it be, that Environment get LOST in this case?! I use my new Procedure in the SAME module as the MAIN-Procedure calling this getTarif() but the debugger shows no values for Environment...

Thank you very much!

Mark
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Mar 05, 2007 7:16 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The Environment tree should never get lost.

It may be that you didn't update it correctly, if you updated it inside a user defined procedure.
_________________
I am *not* the model of the modern major general.
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 Function with ROW-Return-value
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.