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 » Calling PROCEDURE or FUNCTION

Post new topic  Reply to topic
 Calling PROCEDURE or FUNCTION « View previous topic :: View next topic » 
Author Message
neo_revolution
PostPosted: Mon Sep 27, 2004 4:08 am    Post subject: Calling PROCEDURE or FUNCTION Reply with quote

Voyager

Joined: 21 Oct 2003
Posts: 80
Location: NJ

Hello,

I have a set of esql 'SET' statements which are repeating many times. I wanted them to put in a PROCEDURE or FUNCTION so that I can call them when required.

I saw the documentation, it seems PROCEDURE is well suited in my case as the function should return some return value. I have to pass 4 attributed to the PROCEDURE. But there are only 3 pre-determined variables for a PROCEDURE (IN, OUT, INOUT).

Any idea how to proceed? Thanks.
Back to top
View user's profile Send private message Yahoo Messenger
mgk
PostPosted: Mon Sep 27, 2004 4:29 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

I think you have misunderstood the documentation. The IN / OUT / INOUT heywords are not variables, they are direction qualifiers applied to variables, that allow you to change (or not) the variables passed into the procedure. You can have any number of variables (from 0 upwards) passed to each procedure.

E.G.

CREATE PROCEDURE test( IN p1 INT, IN p2 INT, IN p3 CHAR, INOUT p4 INT, OUT p5 INT) ...

Shows a procedure called test that takes 5 parameters of varying directions. Please re-read the docs for the CREATE PROCEDURE and CALL statements if this is still not clear.

Note that unless you are on V5.0 Fix Pack 4, procedures cannot RETURN a value other than by an OUT or INOUT direction parameter. After FP4 procedures can have a RETURNS clause just like functions can...

Cheers,
_________________
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
neo_revolution
PostPosted: Mon Sep 27, 2004 9:10 am    Post subject: Reply with quote

Voyager

Joined: 21 Oct 2003
Posts: 80
Location: NJ

Thanks. It worked.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Calling PROCEDURE or 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.