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 » Reading FileOutput directory value into to a variable

Post new topic  Reply to topic Goto page 1, 2  Next
 Reading FileOutput directory value into to a variable « View previous topic :: View next topic » 
Author Message
WBIMaestro
PostPosted: Tue Jan 03, 2012 3:18 pm    Post subject: Reading FileOutput directory value into to a variable Reply with quote

Acolyte

Joined: 18 Feb 2005
Posts: 53

Hi,

I have a situation, where I create a template message flow and abstracted it as a pattern to publish multiple versions of it reading from different queues. The Flow contains a FileOutPut Node and Ive made this a pattern property to be set for each instance. Now, I need to have the FileOutput Directory value available in the message flow to populate into a variable. Googling the infocenter leads me to beleive that I should be using :
Code:

SET LocalFileDirectory = OutputLocalEnvironment.WrittenDestination.File.Directory;


However this ends up producing a null value. Ive declared the variable as a shared character:

Code:

DECLARE LocalFileDirectory SHARED CHARACTER;


Im going by the infocenter page at :

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac55160_.htm

What could I be doing wrong?

On a side note, Is it possible to set custom pattern properties on say a compute node, so that I can abstract say variable values also to the pattern level? from what I can see it only seems to allow the out-of-the-box node properites to be abstracted to the pattern.

This is with Broker v7

Thanks for the assistance

Cheers
Back to top
View user's profile Send private message
Esa
PostPosted: Tue Jan 03, 2012 11:38 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Hi,

it seems you are trying to read the name of the directory where a FileOutput node has just written a file. This can be done in a compute node that is wired after the FileOutput node. What is wrong with your code is that you should read the value from InputLocalEnvironment, not OutputLocalEnvironment.

But why would you put that value into a shared variable? Are you trying to cache the name of the directory for loggging purposes or something?

Because if you have put the directory name in a pattern property, the logical procedure would be to use that property to configure the output directory in runtime. In that case you would have a compute node before the FileOutput and your code would be something like this:

Code:
SET OutputLocalEnvironment.Destination.File.Directory = <your property value>


Check the details from here: http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac55410_.htm
Back to top
View user's profile Send private message
Esa
PostPosted: Wed Jan 04, 2012 1:04 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Sorry.

I misunderstood something. You also want the flow to be aware of the directory name that you have made a pattern property. In that case the only mistake is that you try to read from OutputLocalEnvironment.

I thought you had made an UDP for configuring the directory name and made that a pattern property. That's how I would have done it. Then you can read the directory name straight from an external variable and you don't have to try to recover it from WrittenDestination (and cache it, as you are obviously doing now). The only drawback is that you will have to set the actual output directory of the FileOutput node dynamically by LocalEnvironment override. But that's just a couple of more code lines in your pattern exemplar.
Back to top
View user's profile Send private message
WBIMaestro
PostPosted: Wed Jan 04, 2012 9:53 am    Post subject: Reply with quote

Acolyte

Joined: 18 Feb 2005
Posts: 53

so I can only read the name of the FileOutout Directory AFTER the Fileoutout Node? I am currently trying to do it before and I think that is what is resukting in a NULL value.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jan 04, 2012 9:59 am    Post subject: Reply with quote

Grand High Poobah

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

WBIMaestro wrote:
so I can only read the name of the FileOutout Directory AFTER the Fileoutout Node?


It's populated by the FileOuput node as the directory it actually used, hence WrittenDestination

In your position I'd use a UDP.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
WBIMaestro
PostPosted: Wed Jan 04, 2012 1:55 pm    Post subject: Reply with quote

Acolyte

Joined: 18 Feb 2005
Posts: 53

whts a UDP?
Back to top
View user's profile Send private message
Esa
PostPosted: Wed Jan 04, 2012 11:31 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

WBIMaestro wrote:
whts a UDP?


http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac00643_.htm
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Jan 05, 2012 5:37 am    Post subject: Reply with quote

Jedi Knight

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

Esa wrote:
WBIMaestro wrote:
whts a UDP?


http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac00643_.htm


Esa - don't give away the secrets. Else, whats a consultant to do?
_________________
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
Vitor
PostPosted: Thu Jan 05, 2012 5:46 am    Post subject: Reply with quote

Grand High Poobah

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

lancelotlinc wrote:
Esa wrote:
WBIMaestro wrote:
whts a UDP?


http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac00643_.htm


Esa - don't give away the secrets. Else, whats a consultant to do?


Live off accumulated earnings?

Move on to the next site where they still don't know the secrets. Before you say anything, this is not the first time someone's asked what a UDP is in this forum and it will not IHMO be the last.

Your future earnings potential is as safe as it ever was.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Esa
PostPosted: Thu Jan 05, 2012 5:55 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

lancelotlinc wrote:
Esa wrote:
WBIMaestro wrote:
whts a UDP?


http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac00643_.htm


Esa - don't give away the secrets. Else, whats a consultant to do?


Lancelot - UDPs and mqsiapplybaroverride are yesterday anyway and free to be revealed to the public
Back to top
View user's profile Send private message
WBIMaestro
PostPosted: Thu Jan 05, 2012 10:21 am    Post subject: Reply with quote

Acolyte

Joined: 18 Feb 2005
Posts: 53

Quote:
UDPs and mqsiapplybaroverride are yesterday


These are yesteday? So whats today? Deployable patterns? just curious...
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Jan 05, 2012 10:56 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

If you have ever faced the issue where the UAT bar override file has been applied to the .BAR files destinged for Production and everyone flaty denying they did anything wrong, you might understand any aversion I might have to using Barfile overrides.

I prefer to keep configuration data in a DB and change that between different systems.

The only time I recommend using a bar file override is to set the number of additional instances.

But hey, you have a choice. Use whatever method rocks your boat.
_________________
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
View user's profile Send private message
Vitor
PostPosted: Thu Jan 05, 2012 11:00 am    Post subject: Reply with quote

Grand High Poobah

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

smdavies99 wrote:
If you have ever faced the issue where the UAT bar override file has been applied to the .BAR files destinged for Production and everyone flaty denying they did anything wrong, you might understand any aversion I might have to using Barfile overrides.


With a feeling of dread at this can of worms opening again, that's not a problem if you remove the humans from the bar file processing with Any or similar. Which has been discussed in depressing levels of detail on this forum and probably is about to be again.

smdavies99 wrote:
I prefer to keep configuration data in a DB and change that between different systems.


Which doesn't fix the problem, just moves it to the DBAs.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jan 05, 2012 11:01 am    Post subject: Reply with quote

Grand High Poobah

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

WBIMaestro wrote:
Quote:
UDPs and mqsiapplybaroverride are yesterday


These are yesteday? So whats today? Deployable patterns? just curious...


I'm curious too...
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Jan 05, 2012 11:11 am    Post subject: Reply with quote

Jedi Knight

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

Vitor wrote:
smdavies99 wrote:
If you have ever faced the issue where the UAT bar override file has been applied to the .BAR files destinged for Production and everyone flaty denying they did anything wrong, you might understand any aversion I might have to using Barfile overrides.


With a feeling of dread at this can of worms opening again, that's not a problem if you remove the humans from the bar file processing with Any or similar. Which has been discussed in depressing levels of detail on this forum and probably is about to be again.

smdavies99 wrote:
I prefer to keep configuration data in a DB and change that between different systems.


Which doesn't fix the problem, just moves it to the DBAs.


Korek, sir Vitor. The problem still exists, just Davies prefers to have DBA humans solve it.

I like the Bar File Override concept, because it greatly assists the automation of your Continuous Integration.

I wonder what Davies does with regard to Web Services? How does Davies override a SOAP Request node's property if not using BFOs?
_________________
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
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 » Reading FileOutput directory value into to a variable
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.