Author |
Message
|
rajmq |
Posted: Thu May 20, 2004 2:40 pm Post subject: Environment Variable Help |
|
|
 Partisan
Joined: 29 Sep 2002 Posts: 331 Location: USA
|
Hi All
Our application Requirement is like..
Using the compute node i am calling stored procedure,it does returns the output parms..after getting the values i am assgining that values to Environment variables..
Code is like..
SET Environment.Variables.Call_pro_Value = out1;
Upto this stage my code works fine..and also trace node is showing Call_pro_Value.
Now i have to send these values to ouput queue..
I was using the below code for that
SET OutputBody =SET Environment.Variables.Call_pro_Value
But the message is not passed out queue.
My Doubt is
1.Without MRM Message Set whether we can use the environment variable property or not??
2.ans is yes..How can i achive this ??
Thanks in Advance
Anand.S |
|
Back to top |
|
 |
Missam |
Posted: Thu May 20, 2004 7:22 pm Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Quote: |
1.Without MRM Message Set whether we can use the environment variable property or not??
|
Yes
Quote: |
ans is yes..How can i achive this ?? |
You said you did it by storing values returned by a stored procedure.
Now if you want to output the values stored in Environment tree.You need a physical representation of the message you want to send to a queue.
Environment Tree is nothing to do with Physical representation of the message thats why you are able to create it.
But writing a message from compute node to output queue defenetely needs a physical representation.This physical representation may be self defined XML or predefined MRM.
if your message falls into MRM you defenetely need a message set and corresponding message defined in the dictionary. |
|
Back to top |
|
 |
rajmq |
Posted: Thu May 20, 2004 9:30 pm Post subject: |
|
|
 Partisan
Joined: 29 Sep 2002 Posts: 331 Location: USA
|
Hai
Thanks for your reply
I think my first question ans is "No" .
if you assgin the any values to environment variable ...for formatting or sending the message to output queue..i have to use the MRM !!!
Is it correct..?? if i am wrong pls correct me !!!
Is there any other way to do this scenerio ??
Basically i will be getting two values from the stored proc..
If the second value flag is true means,i have to pass the message to output queue.otherwise it is passed to error queue.
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri May 21, 2004 2:45 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Quote: |
I think my first question ans is "No" .
if you assgin the any values to environment variable ...for formatting or sending the message to output queue..i have to use the MRM !!! |
This is false. This is not true at all.
You can use the Environment tree in any compute node using any message modeling paradigm - MRM, self defining, NEON, etc.
You do, however, have to understand that the Environment tree does not have a parser associated with it, normally. So if you copy XML data into the Environment subtree, it will stop being XML data - you will for instance change all Attributes into plain elements.
If your message is not passed to the output queue, it is very likely that you are not doing what you think you are doing.
Can you post a trace of your message data from BEFORE the Compute node that moves data from the Environment into the Root, and a trace of data from AFTER that compute node? So we can see what you are trying to do, really, and really why it isn't working?
Also, if you want to see Environment data using the Trace node, you have to include the pattern ${Environment}. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
waugh |
Posted: Fri May 21, 2004 4:56 am Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 225
|
Raj,
If i understand you correctly depending on second output param from stored procedure you want to put first param into output queue(if its true).
correct?
and you are thinking that you can just spit that value from local environment tree.
But, as far as i know you need a physical representation of that message an MRM message set (which you prefer not to use) else need to build a XML message with one single element in it to send a message.
something like
<mymsg>
<result>runout</result>
<mymsg>
where "runout" is your first output param from S. PROC.
In that case you need to build a XML message within your code.
Its very easy to understand refer to ESQL manual on CREATE. |
|
Back to top |
|
 |
rajmq |
Posted: Fri May 21, 2004 5:44 am Post subject: |
|
|
 Partisan
Joined: 29 Sep 2002 Posts: 331 Location: USA
|
Hi
Thank for all your reply
Here i am using BLOB not xml
1.After receiving the blobdata, it is passed to 1st computnode from there stored procedure will excute and returns the two string values..based second value i have pass the message to three different queue.
InputNode---->CompuNode->FilterNode....>compuNode.....>MQOuttNode
if it is xml i can build the structure using mrm.
thanks |
|
Back to top |
|
 |
rajmq |
Posted: Fri May 21, 2004 2:23 pm Post subject: |
|
|
 Partisan
Joined: 29 Sep 2002 Posts: 331 Location: USA
|
Hi All,
I understand Environment property usage..it is just like scrapping pad.
We can store the values and pass that to different node.
But still i am not able to resolve the my problem, i think directly i am assgining the enviroment vlaues to OutputRoot...
Before that i have set some property for sending the message.
My Code is like
SET OutputRoot.Properties.MessageSet ='';
SET OutputRoot.Properties.MessageType ='';
SET OutputRoot.Properties.MessageFormat='MQSTR';
SET OutputRoot.Properties.EnCoding =546;
SET OutputRoot.Properties.CodedCharsetId =437;
SET OutputRoot.Properties.Persistence = FALSE;
SET OutputRoot. =Environment.Variables.S.Proc
after calling the above code the message is passed to fail queue.
raj |
|
Back to top |
|
 |
rajmq |
Posted: Fri May 21, 2004 6:14 pm Post subject: solved... |
|
|
 Partisan
Joined: 29 Sep 2002 Posts: 331 Location: USA
|
Thanks to everybody
My problem is solved ..after using the below code
SET OutputRoot.MQMD.Version = 2;
SET OutputRoot.MQMD.Format = 'MQSTR';
SET OutputRoot.Properties.MessageDomain = 'BLOB';
SET "OutputRoot"."BLOB"."BLOB" = CAST(Environment.Variables.S.proc as BLOB CCSID 819);
Regards
raj  |
|
Back to top |
|
 |
|