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 » Return ROW Variables

Post new topic  Reply to topic
 Return ROW Variables « View previous topic :: View next topic » 
Author Message
kunal07
PostPosted: Thu Mar 20, 2014 2:15 am    Post subject: Return ROW Variables Reply with quote

Acolyte

Joined: 05 Dec 2012
Posts: 72

hi,

i am trying to create a function that will return row type variable but not able to do.

I have created one function CREATE Function Test(IN abc Character) RETURNS ROW

BEGIN

Declae rowdata ROW;

SET rowdata .tes1 = value1;
SET rowdata .test2 == value2;
.........





.......

RETURN rowdata ;


But while deploying i am getting the error : Syntax error : 'keyword Row'.

The token caused a syntax error.

Correct the syntax of your ESQL expression in node '.publish', around line and column '1.62', then redeploy the message flow.


any one can help me on this.

thanks
Back to top
View user's profile Send private message
kunal07
PostPosted: Thu Mar 20, 2014 4:27 am    Post subject: Reply with quote

Acolyte

Joined: 05 Dec 2012
Posts: 72

Hi Champs,
Where are you??
any solution??????
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Mar 20, 2014 4:35 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Here's your problem:
Code:
Declae rowdata ROW;

That was easy.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
kunal07
PostPosted: Thu Mar 20, 2014 4:37 am    Post subject: Reply with quote

Acolyte

Joined: 05 Dec 2012
Posts: 72

any solution??? if its easy,..
i am getting the deployment error.
can you please suggest anything to resolve that deployment error???
Back to top
View user's profile Send private message
kunal07
PostPosted: Thu Mar 20, 2014 4:38 am    Post subject: Reply with quote

Acolyte

Joined: 05 Dec 2012
Posts: 72

its declare row data only
Back to top
View user's profile Send private message
kunal07
PostPosted: Thu Mar 20, 2014 4:53 am    Post subject: Reply with quote

Acolyte

Joined: 05 Dec 2012
Posts: 72

guys is it possible to return ROW datatype variable from a function ?????
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Mar 20, 2014 4:58 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kunal07 wrote:
can you please suggest anything to resolve that deployment error???


Don't use a ROW type variable as a parameter.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Mar 20, 2014 4:59 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kunal07 wrote:
guys is it possible to return ROW datatype variable from a function ?????


No, and show some patience!

We all have day jobs. If you want an urgent answer raise a PMR!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kunal07
PostPosted: Thu Mar 20, 2014 5:36 am    Post subject: Reply with quote

Acolyte

Joined: 05 Dec 2012
Posts: 72

ok so we cannt use the ROW variable as return type. ????

i have to return a list of array value from a function..
is there any other way you suggest???
Back to top
View user's profile Send private message
Esa
PostPosted: Thu Mar 20, 2014 5:54 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Declare the ROW variable outside the function/procedure

Create a child element to it.
Declare a reference to the child element;

pass the reference to the procedure

within the procedure, create a list by adding child elements under the reference as in your first example

And, when creating your next topic, do some testing with at least Code and Preview buttons in the post editor.
Back to top
View user's profile Send private message
kunal07
PostPosted: Thu Mar 20, 2014 6:21 am    Post subject: Reply with quote

Acolyte

Joined: 05 Dec 2012
Posts: 72

thanks for the reply. I have already done that but actually i want to return this as an array.

is it possible to return this.

i will going to call a function from mapping node and i want to return an array.
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 » Return ROW Variables
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.