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 Environment Variables from WMB to WTX

Post new topic  Reply to topic Goto page 1, 2  Next
 Passing Environment Variables from WMB to WTX « View previous topic :: View next topic » 
Author Message
pratuluv
PostPosted: Mon Apr 23, 2012 4:35 am    Post subject: Passing Environment Variables from WMB to WTX Reply with quote

Acolyte

Joined: 25 May 2011
Posts: 53

I am using WMB 7.0.0.2 and WTX 8.3. I use a WTX map node in my WMB message flow. I want to pass some Environment Variables from WMB to be accessible in WTX. Is that possible?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Apr 23, 2012 5:00 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Unless your customer has specifically instructed you to specifically implement a given piece of code using WTX, your solution will be more maintainable and perform better if you DO NOT use WTX for the bulk of the work.
Back to top
View user's profile Send private message
pratuluv
PostPosted: Mon Apr 23, 2012 5:26 am    Post subject: Reply with quote

Acolyte

Joined: 25 May 2011
Posts: 53

Its part of my requirement and I have to use a WTX map node. But before I send the data to Map, I am populating some variables dynamically which is not part of the message structure/type tree that is used in WTX. Hence I am looking for some method to pass the variables and access them in the MAP.

IS that possible?
Back to top
View user's profile Send private message
kash3338
PostPosted: Mon Apr 23, 2012 8:58 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Refer the link,

http://www.mqseries.net/phpBB2/viewtopic.php?t=58764&sid=617e3da8f24a9b6f115ce554de5011f1

Guess this is your requirement. A little bit of googling might have fetched you this.
Back to top
View user's profile Send private message Send e-mail
pratuluv
PostPosted: Tue Apr 24, 2012 6:17 am    Post subject: Reply with quote

Acolyte

Joined: 25 May 2011
Posts: 53

kash3338 wrote:
Refer the link,

http://www.mqseries.net/phpBB2/viewtopic.php?t=58764&sid=617e3da8f24a9b6f115ce554de5011f1

Guess this is your requirement. A little bit of googling might have fetched you this.


Hi Kash, Thanks for your help but thats not what I am looking for. I am more looking at passing Environment variables and not the local environment tree.
To explain further,
My input card is a predefined SWIFT message type tree and output is a fixed length in WTX. One of the field in the output card needs to be set with a value that is populated in WMB based on certain conditions. I need to pass this value set in WMB to WTX map.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Apr 24, 2012 6:40 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The term 'environment variable' is obviously causing confusion. Please explain, in tedious and unnecessary detail, exactly what *you* mean when you say that.
Back to top
View user's profile Send private message
pratuluv
PostPosted: Tue Apr 24, 2012 6:42 am    Post subject: Reply with quote

Acolyte

Joined: 25 May 2011
Posts: 53

kimbert wrote:
The term 'environment variable' is obviously causing confusion. Please explain, in tedious and unnecessary detail, exactly what *you* mean when you say that.


I guess I have pretty much explained in the last reply.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Apr 24, 2012 7:00 am    Post subject: Reply with quote

Grand High Poobah

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

pratuluv wrote:
I guess I have pretty much explained in the last reply.


If you had, you wouldn't still be getting questions.

Do you mean:

- an environment variable at an OS level
- an element within the Environment Tree for the flow
- an element within the LocalEnvironment
- a variable which is shared within the runtime environment
- a variable which is cached within the environment

You might also explain why the requirement to use a WTX node. Why is your client (from whom I'm assuming this comes) giving technical rather than business requirements? Especially when they're forcing you into a non-optimal development path?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pratuluv
PostPosted: Tue Apr 24, 2012 7:28 am    Post subject: Reply with quote

Acolyte

Joined: 25 May 2011
Posts: 53

Vitor wrote:
pratuluv wrote:
I guess I have pretty much explained in the last reply.


If you had, you wouldn't still be getting questions.

Do you mean:

- an environment variable at an OS level
- an element within the Environment Tree for the flow
- an element within the LocalEnvironment
- a variable which is shared within the runtime environment
- a variable which is cached within the environment

You might also explain why the requirement to use a WTX node. Why is your client (from whom I'm assuming this comes) giving technical rather than business requirements? Especially when they're forcing you into a non-optimal development path?


I am not sure if this site is more about providing solutions or something else.

As far as using WTX node is concerned, it is a part of my requirement which cannot be questioned.

In the compute node just before the WTX map node, I am setting value of a variable based on some conditions. For ex,

If (TRUE) THEN
SET Environment.Variables.ReasonCode = 'Verified';
Else
SET Environment.Variables.ReasonCode = 'Unverified';
End if;
I want to access this "Environment.Variables.ReasonCode" set in the compute node in the next WTX map node. How can I do it.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Apr 24, 2012 7:36 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

WTX Maps can only access Data that is in Cards.

The WTX nodes only submit the message body as a Card by default.

It's going to be much easier for you to stick your compute node result into the message data rather than the Environment Tree.
Back to top
View user's profile Send private message
pratuluv
PostPosted: Tue Apr 24, 2012 7:51 am    Post subject: Reply with quote

Acolyte

Joined: 25 May 2011
Posts: 53

mqjeff wrote:
WTX Maps can only access Data that is in Cards.

The WTX nodes only submit the message body as a Card by default.

It's going to be much easier for you to stick your compute node result into the message data rather than the Environment Tree.


Thanks a lot for your reply with very good clarity. Its appreciated.

The scenarios is something like this. My input message format is SWIFT MT54x and if any exception occurs in the WMB flow, I have to pass this initial SWIFT message received as input to the WTX map node and generate a SWIFT NAK(Not ACK) message. The SWIFT NAK message which would be the output card in the WTX map needs the ReasonCode for one of its fields.

This reason code is set in the compute node based on the type of exception occured in WMB flow. Is that clear?

For now, I am storing this reason code in Database table and doing a DB Lookup in WTX map but going forward looks like I cannot use DB anymore for this. Hence trying to find a way out.
Back to top
View user's profile Send private message
kash3338
PostPosted: Tue Apr 24, 2012 7:52 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

pratuluv wrote:

My input card is a predefined SWIFT message type tree and output is a fixed length in WTX. One of the field in the output card needs to be set with a value that is populated in WMB based on certain conditions. I need to pass this value set in WMB to WTX map.


This link explains all that can be done using WTX node,

http://www.ibm.com/developerworks/websphere/library/techarticles/0907_gupta/0907_gupta.html

I can see (based on your requirement explained here) your requirement is also explained here. Hope it helps.
Back to top
View user's profile Send private message Send e-mail
pratuluv
PostPosted: Tue Apr 24, 2012 8:07 am    Post subject: Reply with quote

Acolyte

Joined: 25 May 2011
Posts: 53

kash3338 wrote:
pratuluv wrote:

My input card is a predefined SWIFT message type tree and output is a fixed length in WTX. One of the field in the output card needs to be set with a value that is populated in WMB based on certain conditions. I need to pass this value set in WMB to WTX map.


This link explains all that can be done using WTX node,

http://www.ibm.com/developerworks/websphere/library/techarticles/0907_gupta/0907_gupta.html

I can see (based on your requirement explained here) your requirement is also explained here. Hope it helps.


Thanks Kash for the link, I went through all these links already but it doesn't talk about my issue
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Apr 24, 2012 8:40 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Have you tried using an Exit function from within the map to retrieve the exception list?

http://pic.dhe.ibm.com/infocenter/wtxdoc/v8r4m0/index.jsp?topic=%2Fcom.ibm.websphere.dtx.cs.doc%2Freferences%2Fr_command_server_Using_the_Batch_EXIT_Function.htm


Quote:
For C language exits, a single argument is passed, which is the address of the EXITPARAM structure.


This method is not thread-safe in WTX versions prior to 8.4.0.0. This means you can have "zero additional instances" and only one WTX map per Execution Group.

8.4.0.0 product design supports thread-safe access to the EXITPARAM structure, but there are many APARs and threading/memory management bugs not yet resolved in any Generally Available WTX fixpack.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Apr 24, 2012 8:42 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

pratuluv wrote:
Thanks Kash for the link, I went through all these links already but it doesn't talk about my issue

It does talk about your issue, in that it shows you how to construct more than one input card.

You continue to believe that you can get away with doing something other than making a copy of the data you need into individual cards.

As I've already said, WTX only sees data in Cards.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Passing Environment Variables from WMB to WTX
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.