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 » General Discussion » Name of Output file in Message Broker 6.1

Post new topic  Reply to topic
 Name of Output file in Message Broker 6.1 « View previous topic :: View next topic » 
Author Message
mansoorafzal
PostPosted: Tue May 19, 2009 12:10 am    Post subject: Name of Output file in Message Broker 6.1 Reply with quote

Novice

Joined: 19 May 2009
Posts: 14

Hi,

I am new to IBM WebSphere and working with Message Broker 6.1.
I have used FileOutput node to generate the output file. I want to append the date time stamp in the name of the output file.
How can I achieve this?

Thanks in advance,
Best Regards.
Back to top
View user's profile Send private message
gs
PostPosted: Tue May 19, 2009 12:20 am    Post subject: Reply with quote

Master

Joined: 31 May 2007
Posts: 254
Location: Sweden

See the FileOutput node section in the WMB manual.

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac55160_.htm
Back to top
View user's profile Send private message
zpat
PostPosted: Tue May 19, 2009 12:41 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Code:
SET FileName = CAST(CURRENT_TIMESTAMP AS CHAR FORMAT 'yyyyMMdd-HHmm');
SET OutputLocalEnvironment.Destination.File.Name =  'FRED-' || FileName;


Make sure the compute node sets the localenvironment.
Back to top
View user's profile Send private message
mansoorafzal
PostPosted: Tue May 19, 2009 10:24 pm    Post subject: Reply with quote

Novice

Joined: 19 May 2009
Posts: 14

I have tried to do as you have mentioned but got the following exception:

ExceptionList:

( ['MQROOT' : 0x832e258]
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S610_P\src\DataFlowEngine\ImbDataFlowNode.cpp' (CHARACTER)
(0x03000000):Line = 739 (INTEGER)
(0x03000000):Function = 'ImbDataFlowNode::createExceptionList' (CHARACTER)
(0x03000000):Type = 'ComIbmFileOutputNode' (CHARACTER)
(0x03000000):Name = 'Converter_MessageFlow#FCMComposite_1_2' (CHARACTER)
(0x03000000):Label = 'Converter_MessageFlow.BaseII_Flexcube_Target_Output' (CHARACTER)
(0x03000000):Catalog = 'BIPv610' (CHARACTER)
(0x03000000):Severity = 3 (INTEGER)
(0x03000000):Number = 2230 (INTEGER)
(0x03000000):Text = 'Node throwing exception' (CHARACTER)
(0x01000000):RecoverableException = (
(0x03000000):File = 'ComIbmFileOutputNode.java' (CHARACTER)
(0x03000000):Line = 539 (INTEGER)
(0x03000000):Function = 'locateOutputFile' (CHARACTER)
(0x03000000):Type = '' (CHARACTER)
(0x03000000):Name = '' (CHARACTER)
(0x03000000):Label = '' (CHARACTER)
(0x03000000):Catalog = 'BIPv610' (CHARACTER)
(0x03000000):Severity = 3 (INTEGER)
(0x03000000):Number = 3325 (INTEGER)
(0x03000000):Text = '' (CHARACTER)
(0x01000000):Insert = (
(0x03000000):Type = 5 (INTEGER)
(0x03000000):Text = 'BaseII_Flexcube_Target_Output' (CHARACTER)
)
(0x01000000):Insert = (
(0x03000000):Type = 5 (INTEGER)
(0x03000000):Text = 'Converter_MessageFlow' (CHARACTER)
)
(0x01000000):Insert = (
(0x03000000):Type = 5 (INTEGER)
(0x03000000):Text = 'null' (CHARACTER)
)
(0x01000000):Insert = (
(0x03000000):Type = 5 (INTEGER)
(0x03000000):Text = 'null' (CHARACTER)
)
)
)
)

Seems that there is something that I have skipped.
Back to top
View user's profile Send private message
zpat
PostPosted: Tue May 19, 2009 11:11 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Did you declare FileName as CHAR? Or just combine those two lines of code into one.

Code:

SET OutputLocalEnvironment.Destination.File.Name =  'FRED-' || CAST(CURRENT_TIMESTAMP AS CHAR FORMAT 'yyyyMMdd-HHmm');


If you want seconds in the filename, just add 'sssss" to the format string.
Back to top
View user's profile Send private message
mansoorafzal
PostPosted: Tue May 19, 2009 11:36 pm    Post subject: Reply with quote

Novice

Joined: 19 May 2009
Posts: 14

I have declared it as CHARACTER.

Now, I have also tried to set the Directory and Name in LocalEnvironment / File in Mapping Node but the exception is the same.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed May 20, 2009 1:04 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Get it working in a basic mode first - set all the necessary properties on the fileoutput node.

When that works, add the compute node prior to it.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 20, 2009 4:31 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

zpat wrote:
Make sure the compute node sets the localenvironment.
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 » General Discussion » Name of Output file in Message Broker 6.1
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.