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 » non-destructively polling a file folder for new files?

Post new topic  Reply to topic Goto page 1, 2  Next
 non-destructively polling a file folder for new files? « View previous topic :: View next topic » 
Author Message
wbinewbie
PostPosted: Mon Dec 24, 2012 1:10 pm    Post subject: non-destructively polling a file folder for new files? Reply with quote

Novice

Joined: 24 Dec 2012
Posts: 11

Hi,

Is it possible at all to scan a directory for new files and read then non-destructively in message broker. I know that destructive read is possible with fileread node but was wondering about non-destructive...
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Dec 24, 2012 5:06 pm    Post subject: Re: non-destructively polling a file folder for new files? Reply with quote

Grand High Poobah

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

wbinewbie wrote:
Is it possible at all to scan a directory for new files and read then non-destructively in message broker.


Why? What's the requirement?

How would you do this with a non-WMB application (C or Java)? How would you determine any file you found with a scan was new?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
wbinewbie
PostPosted: Wed Dec 26, 2012 8:15 am    Post subject: Reply with quote

Novice

Joined: 24 Dec 2012
Posts: 11

the requirement is to ingest the file to process in broker but not delete the original in case it is needed later... currently the non-wmb app renames these files...a related, non-wmb question, at what point in an ftp is the file deleted from the source location. is it after the file transfer itself has ended?
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Dec 26, 2012 8:26 am    Post subject: Re: non-destructively polling a file folder for new files? Reply with quote

Jedi Knight

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

wbinewbie wrote:
Is it possible


Yes. Using WMB, you can do this. Be creative. Try something.
_________________
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
wbinewbie
PostPosted: Wed Dec 26, 2012 10:06 am    Post subject: Reply with quote

Novice

Joined: 24 Dec 2012
Posts: 11

u mean use a jcn or some other custom code? was thinking so too but didnt want to reinvent the wheel if functionality existed
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Dec 26, 2012 11:36 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.

One of the things we like people to do here is something rather strange.

We like people to try thing for themselves. This way they learn for themselves. I know from personal experience that for some cultures this is difficult but it is possible. If you try a few things for yourself and run into problems you will find that you get a much more positive response to your posts.

Consider this:-

1) A post where you get the minimum of detail and a plea for help

2) A post that says, I have this problem to solve. I tried this, this and this abut these were the issues I faced, whare am I going wrong?

Now put yourself in the shoes of those of us who respond to posts on this forum. Then ask youself which one would you rather answer? 1) or 2)?

It isn't difficult to understand that 2) is what we like to see.

So the moral of this story in this season of goodwill and celbration (for Christians) is

Experiment and don't be afraid to fail/get it wrong and try again. You won't lose any face/respect here if you do. in fact, you will gain kudos. Then people with far more experience of this product than yourself will be far more willing to give you pointers that will set you off going in the right direction.

end of my 'sermon on the mount'
_________________
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
wbinewbie
PostPosted: Wed Dec 26, 2012 12:12 pm    Post subject: Reply with quote

Novice

Joined: 24 Dec 2012
Posts: 11

yup, thank you for that fine helping of holiday spirits, kind sir.

as you may note, I did do a bit of research, looking into filread nodes etc..before posting a question here. didnt want to get down to writing code just yet, since this is the kind of thing that broker is supposed to not require us to write code for(and instead focus on business logic)... You will also kindly note that I did not indicate this was urgent or showstopping in any way. just a question out of curiosity and to see if there was some east way to do this.

we can all keep going down every wrong route before asking for directions or trying to find a map but sometimes the latter is a wiser approach. Cheers
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Dec 26, 2012 12:15 pm    Post subject: Reply with quote

Jedi Knight

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

wbinewbie wrote:
this is the kind of thing that broker is supposed to not require us to write code


No where in any WMB marketing or technical document will you find any claim that WMB provides codeless solutions. WMB toolkit is not a turn-key, drag-and-drop codeless solution.

Coding and logic are always required.
_________________
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
smdavies99
PostPosted: Wed Dec 26, 2012 12:31 pm    Post subject: Reply with quote

Jedi Council

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

lancelotlinc wrote:


No where in any WMB marketing or technical document will you find any claim that WMB provides codeless solutions. WMB toolkit is not a turn-key, drag-and-drop codeless solution.


Strange that. I used to demo the virtues of Broker by showing how I could build a Webservice to SAP(bapi) flow without writing a line of ESQL/Java. Ok, I used the Mapping node but it can be done. and yes there was a proper error handling setup as well. That was common to all flows.

Happy Crimble.
_________________
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
wbinewbie
PostPosted: Thu Dec 27, 2012 8:34 am    Post subject: Reply with quote

Novice

Joined: 24 Dec 2012
Posts: 11

yeah, im leaning towards using a timer node and a job execution node(supportpac IA9Z) to call a script that does a non destructive get+rename of files and maybe a fileread node to ingest the files into broker. only other option I can think of is to write code for it. they should make the IA9Z supportpac a part of broker. its quite useful. i beleive tibco ems has a command line adapter as part of the product...
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Dec 27, 2012 9:00 am    Post subject: Reply with quote

Jedi Knight

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

wbinewbie wrote:
yeah, im leaning towards using a timer node and a job execution node(supportpac IA9Z) to call a script that does a non destructive get+rename of files and maybe a fileread node to ingest the files into broker. only other option I can think of is to write code for it. they should make the IA9Z supportpac a part of broker. its quite useful. i beleive tibco ems has a command line adapter as part of the product...


Yukky ewe.
_________________
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
wbinewbie
PostPosted: Thu Dec 27, 2012 11:23 am    Post subject: Reply with quote

Novice

Joined: 24 Dec 2012
Posts: 11

I agree, actually. still thinking
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 27, 2012 2:45 pm    Post subject: Reply with quote

Grand High Poobah

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

wbinewbie wrote:
yeah, im leaning towards using a timer node and a job execution node(supportpac IA9Z) to call a script that does a non destructive get+rename of files and maybe a fileread node to ingest the files into broker.


Explain exactly how that differs from what the FileInput node does out of the box, except that the node moves the file rather than renames it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
zpat
PostPosted: Fri Dec 28, 2012 1:01 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

You can get into all kinds of file locking issues with a DIY approach. Files are inherently non-transactionally safe.

IBM have done their best to prevent problems using file locking logic and so forth. If you use a DIY approach you are going to lose that feature.

The point of using WMB is to avoid using your own code and get the benefit of professionally written code.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Dec 28, 2012 6:53 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
wbinewbie wrote:
yeah, im leaning towards using a timer node and a job execution node(supportpac IA9Z) to call a script that does a non destructive get+rename of files and maybe a fileread node to ingest the files into broker.


Explain exactly how that differs from what the FileInput node does out of the box, except that the node moves the file rather than renames it.


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 » non-destructively polling a file folder for new files?
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.