Author |
Message
|
mahesh2069 |
Posted: Fri Aug 23, 2013 9:25 pm Post subject: Issue in Procedure using inout paramter as outputRoot |
|
|
Centurion
Joined: 26 Jun 2013 Posts: 103
|
Hi developers,
I have a issue in using inout parameter in procedure.After calling procedure ,it will go to that procedure after completely execute all statements in procedure It will through Exception
Code: |
CALL createMqmdHeaders(OutputRoot,ccsid,encoding);
-- With in module I create this procedure
-- Create MQMD Elements
CREATE PROCEDURE createMqmdHeaders ( INOUT outRoot REFERENCE,IN ccsid INTEGER,IN encoding INTEGER)
BEGIN
SET outRoot.MQMD.Version=2;
SET outRoot.MQMD.Format='MQRFH2';
SET outRoot.MQMD.Encoding=encoding;
SET outRoot.MQMD.CodedCharSetId=ccsid;
END; |
I got following Exception
Code: |
Insert
Type:INTEGER:5
Text:CHARACTER:createMqmdHeaders(OutputRoot, ccsid, encoding);
RecoverableException
File:CHARACTER:F:\build\slot1\S800_P\src\DataFlowEngine\ImbRdl\ImbRdlRoutine.cpp
Line:INTEGER:2495
Function:CHARACTER:SqlRoutine::clearDownChildEnv
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2933
Text:CHARACTER:
Insert
Type:INTEGER:5
Text:CHARACTER:outRoot |
Please help me to resolve this issue _________________ Thanks & Regards
Mahesh Mediboyina
WMB Developer |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Aug 23, 2013 9:46 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Perhaps actually passing a reference might work
Code: |
declare outRef REFERENCE to OutputRoot;
CALL createMqmdHeaders(outRef,ccsid,encoding);
|
_________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
dogorsy |
Posted: Fri Aug 23, 2013 10:02 pm Post subject: |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
The exception list you posted contains 2 error messages. If look at the message text , you will find the answer.
BIP2933
Error messages are issued to give the user an indication of the problem, and help them solve it, not for the message to be just copied and pasted into a forum and say HELP
Last edited by dogorsy on Fri Aug 23, 2013 10:04 pm; edited 1 time in total |
|
Back to top |
|
 |
Simbu |
Posted: Fri Aug 23, 2013 10:02 pm Post subject: |
|
|
 Master
Joined: 17 Jun 2011 Posts: 289 Location: Tamil Nadu, India
|
No need of passing OutputRoot to the procedure as both are in same module.You can directly access OutputRoot in the procedure. |
|
Back to top |
|
 |
mahesh2069 |
Posted: Fri Aug 23, 2013 10:17 pm Post subject: It's Working |
|
|
Centurion
Joined: 26 Jun 2013 Posts: 103
|
Hi smdavies99,
Thank you ,it's working Fine.
I have one doubt, If I want to know is there any structure or is that refernce exist are not, How can I know?
Plz check it ,and correct it
Code: |
IF InputRoot.Properties IS NOT NULL THEN
-- some statements
END IF;
it is not working.
exist(InputRoot.Properties.*[])
Working fine
but Properties element contain list of different elements , like CodedCharaterSet,Encoding like etc
Shall we use InputRoot.Properties.*[] statement is usefully, to know sub elements of ' Properties' exist or not ? |
_________________ Thanks & Regards
Mahesh Mediboyina
WMB Developer |
|
Back to top |
|
 |
mahesh2069 |
Posted: Fri Aug 23, 2013 10:37 pm Post subject: Can I refer diff sub Elements of Element as array? |
|
|
Centurion
Joined: 26 Jun 2013 Posts: 103
|
Thanks All,
I want to know is there any structure or is that refernce exist are not, How can I know?
Code: |
IF InputRoot.Properties IS NOT NULL THEN
-- some statements
END IF;
it is not working.
exist(InputRoot.Properties.*[])
Working fine
but Properties element contain list of different elements , like CodedCharaterSet,Encoding like etc
Shall we use InputRoot.Properties.*[] statement is usefully, to know sub elements of ' Properties' exist or not ? |
_________________ Thanks & Regards
Mahesh Mediboyina
WMB Developer |
|
Back to top |
|
 |
dogorsy |
Posted: Fri Aug 23, 2013 10:43 pm Post subject: Re: Can I refer diff sub Elements of Element as array? |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
mahesh2069 wrote: |
Thanks All,
I want to know is there any structure or is that refernce exist are not, How can I know?
Code: |
IF InputRoot.Properties IS NOT NULL THEN
-- some statements
END IF;
it is not working.
exist(InputRoot.Properties.*[])
Working fine
but Properties element contain list of different elements , like CodedCharaterSet,Encoding like etc
Shall we use InputRoot.Properties.*[] statement is usefully, to know sub elements of ' Properties' exist or not ? |
|
You can know by doing the relevant education. There are courses for WMB that will give you the knowdlege you need. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sat Aug 24, 2013 8:49 am Post subject: Re: Can I refer diff sub Elements of Element as array? |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
dogorsy wrote: |
You can know by doing the relevant education. There are courses for WMB that will give you the knowdlege you need. |
In the meantime, using the search option on this forum can reveal a wealth of information. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Aug 25, 2013 2:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Passing a reference you should only use inout if the reference passed out is not the same as the reference passed in... i.e. if it doesn't point to the same part of the tree.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
dogorsy |
Posted: Sun Aug 25, 2013 4:06 am Post subject: |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
fjb_saper wrote: |
Passing a reference you should only use inout if the reference passed out is not the same as the reference passed in... i.e. if it doesn't point to the same part of the tree.
Have fun  |
Absolutely right, but would the OP appreciate what you are trying to tell him ?... |
|
Back to top |
|
 |
|