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 » Best Way To Handle File and Directory Management In Broker

Post new topic  Reply to topic
 Best Way To Handle File and Directory Management In Broker « View previous topic :: View next topic » 
Author Message
bdaoust
PostPosted: Tue Dec 04, 2012 10:05 am    Post subject: Best Way To Handle File and Directory Management In Broker Reply with quote

Centurion

Joined: 23 Sep 2010
Posts: 130

I'm needing to create a directory based on information coming in from an XML and then place the XML within that directory, also based on the same value.

So directory ABC would have an XML within it called ABC.

I've gotten this to work by using the FileOutPut node and some ESQL as well:

SET OutputLocalEnvironment.Destination.File.Directory = 'D:\' || MyDir;
SET OutputLocalEnvironment.Destination.File.Name = InputRoot.XMLNSC.ns18:CaseImport.cmsCode;

How can I have this code check to see if the directory exists and if it does rename the existing directory with the original name of that directory and a datestamp?

I asked the user why I can't just rename if XML being placed within the directory, but they want the directory itself renamed. I told them I'm not sure that broker has the ability to rename an existing directory or not.

Thank you.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Dec 04, 2012 10:16 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

create the directory with a datestamp in the first place.
Back to top
View user's profile Send private message
bdaoust
PostPosted: Tue Dec 04, 2012 12:59 pm    Post subject: Reply with quote

Centurion

Joined: 23 Sep 2010
Posts: 130

The person wanting the directory does not want this because then when he dynamically goes to get to the directory, he won't know that exact name due to the datetime stamp. However, I'm thinking of creating the directory with the time date stamp and then sending him that value within the XML, which he can then parse to know what broker used at the time the directory was created.
Back to top
View user's profile Send private message
kash3338
PostPosted: Tue Dec 04, 2012 6:45 pm    Post subject: Re: Best Way To Handle File and Directory Management In Brok Reply with quote

Shaman

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

bdaoust wrote:

How can I have this code check to see if the directory exists and if it does rename the existing directory with the original name of that directory and a datestamp?


Are the directories created only from your flow? If yes, you can try this approach,

You can have a SHARED array which stores the dir names once they are created for the first time. Everytime you create a directory, check if the name already exists in the SHARED array. If yes, append a timestamp, else create it directly.
Back to top
View user's profile Send private message Send e-mail
marko.pitkanen
PostPosted: Tue Dec 04, 2012 10:57 pm    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi bdaoust,

If nothing with built-in functionality or redesign helps you to solve the need you can perhaps consider to enhance brokers ability with Java.

--
Marko
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Best Way To Handle File and Directory Management In Broker
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.