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 » Passing Array as a Parameter to Function

Post new topic  Reply to topic
 Passing Array as a Parameter to Function « View previous topic :: View next topic » 
Author Message
semcgurk
PostPosted: Fri Nov 15, 2013 7:25 am    Post subject: Passing Array as a Parameter to Function Reply with quote

Newbie

Joined: 14 Nov 2013
Posts: 9

Hi there,

I am trying to create a Function that allows an array to be passed in as a parameter.

I cannot get the signature of the function right.

I have tried the following:

Code:

CREATE FUNCTION FilterByMultipleValues(IN CharArray[]) RETURNS CHAR


and

Code:

CREATE FUNCTION FilterByMultipleValues(IN CharArray[] CHAR) RETURNS CHAR


and the editor reports a syntax error with both of these.

Can anyone help me with this please?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Nov 15, 2013 7:43 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There's no such thing as an ARRAY in esql.

Learn and accept that.

What you are pretending is an array is either a list or a row or an element in the message tree.

You can't pass lists around, so it can't be a list.

Go back to the ESQL manual. Understand all of the available types.
Back to top
View user's profile Send private message
semcgurk
PostPosted: Fri Nov 15, 2013 8:03 am    Post subject: Reply with quote

Newbie

Joined: 14 Nov 2013
Posts: 9

If it is an Environment Variable with multiple instances, could I not just create a reference to it and thus define my function thus:

Code:

CREATE FUNCTION FilterByMultipleValues(IN CharArray[]) RETURNS CHAR
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Nov 15, 2013 8:08 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

semcgurk wrote:
If it is an Environment Variable with multiple instances, could I not just create a reference to it and thus define my function thus:

Code:

CREATE FUNCTION FilterByMultipleValues(IN CharArray[]) RETURNS CHAR


No, because that doesn't define a reference.

But you're on the right track.
Back to top
View user's profile Send private message
semcgurk
PostPosted: Fri Nov 15, 2013 8:14 am    Post subject: Reply with quote

Newbie

Joined: 14 Nov 2013
Posts: 9

D'oh!

Copy and paste #fail:

Code:

CREATE FUNCTION FilterByMultipleValues(IN CharArray REFERENCE) RETURNS CHAR
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Nov 15, 2013 8:17 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Back to top
View user's profile Send private message
semcgurk
PostPosted: Fri Nov 15, 2013 8:26 am    Post subject: Reply with quote

Newbie

Joined: 14 Nov 2013
Posts: 9

Thank you!
Back to top
View user's profile Send private message
dogorsy
PostPosted: Fri Nov 15, 2013 9:39 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

Honestly !... it is well documented. It would be a lot quicker to read the docs than to ask in this forum.
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 » Passing Array as a Parameter to Function
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.