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 » FileOutput node: how to use variable in Filename field?

Post new topic  Reply to topic
 FileOutput node: how to use variable in Filename field? « View previous topic :: View next topic » 
Author Message
pcelari
PostPosted: Mon Aug 03, 2009 7:11 am    Post subject: FileOutput node: how to use variable in Filename field? Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

Hi,

I use a FileOutput node to send file over FTP to a remote location. I saved a timestamp-related extention in a shared variable, FileExt.

But how can I use this varible in the "File name or pattern" field of the FileOutput node? For example, Orders.${FileExt}?

thanks a lot for any insight.


_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Aug 03, 2009 7:27 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Doesn't need to be shared. Just set in compute node, e.g.


SET OutputLocalEnvironment.Destination.File.Name = 'Orders.' || FileExt;
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Aug 03, 2009 7:40 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.

The solution is in the Documentation

AND

if you look at the greyed out path in the properites of the fileoutput node in the toolkit. just change the sort of xpath style to '.' notation.
_________________
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
pcelari
PostPosted: Tue Aug 04, 2009 4:43 am    Post subject: Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

many thanks for the insights!

How come I didn't see such capabilities in the document?

Will make it work and report back with my solution.
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
pcelari
PostPosted: Tue Aug 04, 2009 12:16 pm    Post subject: Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

zpat wrote:
Doesn't need to be shared. Just set in compute node, e.g.


SET OutputLocalEnvironment.Destination.File.Name = 'Orders.' || FileExt;



it works this way. I used the timestamp function to add the extra extention directly:

set OutputLocalEnvironment.Destination.File.Name =
InputLocalEnvironment.File.Name || '.' ||
substring(cast(InputLocalEnvironment.File.TimeStamp as char) before '_');

Yet, one thing puzzles me was that I have to put the same code in compute nodes in both routes - FileInput out - FileOutput In, and FileInput End of Data - FileOutput Finish File.

If one of the routes doesn't have this code, I'll get exception complaining about failure in composing message, because the field is empty, although I put a default file pattern '*' in the FileOutput node properties.

I consider this duplicate unnecessary.


_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » FileOutput node: how to use variable in Filename field?
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.