|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
FileInput Node issue |
« View previous topic :: View next topic » |
Author |
Message
|
qyh001 |
Posted: Mon Nov 01, 2010 1:20 am Post subject: FileInput Node issue |
|
|
Newbie
Joined: 01 Nov 2010 Posts: 2
|
I happen a issue about SAP transferring a large file to WMB,
I use FileInput Node receiver from SAP message,
when SAP create a flat file(IDOC) and append data to this file,
then large data not append 100% complete, but this time WMB find that part file and open this part file to execute application,
event already trigger, the rest data can not be use on after process, this is a question, what can i do to makesure the file already transferring complete.
i think on UNIX system when SAP write file not complete,the other application can not be read in same thim. but this case can be read,
i don't konw why i can read a part file,who can i help me,i need help.thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 01, 2010 4:30 am Post subject: Re: FileInput Node issue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
qyh001 wrote: |
i think on UNIX system when SAP write file not complete,the other application can not be read in same thim |
Wrong. Depending on the flavour of Unix, it's perfectly possible that an application can get a file handle to read a partially complete file. As soon as a file entry exists in WMB's input directory the File Input node will find it on the next poll. It will attempt to get a handle on it & if that succeeds it'll read whatever's there.
This is one good reason people don't use files. Especially if they have a WMQ license.
qyh001 wrote: |
i need help |
You can write the file to an intermediate directory & when it's complete move it to WMB's input directory. How you detect the file's complete & move it is an exercise for the reader, as is how you detect partial transfer failures & other issues.
Alternatively you can use WMQ rather than a file to move the data & solve all your problems in one fell swoop. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
joebuckeye |
Posted: Mon Nov 01, 2010 5:45 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
Most UNIX type shops I've worked in that deal with FTP-ing files between servers use the convention of starting the file name of the file being FTP-d with a . (period).
A file starting with a period is "hidden" to the basic UNIX directory listing tools (you need to use ls -a to see the file in the directory). We require the sending side to have their in transit filename start with a period and then when they are done with the FTP they rename the file without the period at the start. This works because the rename/move (or mv) operation is very, very quick on UNIX, unless you are moving the file between file systems that is.
I'm not sure if the FileInput node would work with this or if it would still detect the "hidden" file.
If it does detect the "hidden" file then you are up to playing directory games to prevent the file from being read before the FTP is complete. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 01, 2010 5:49 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
joebuckeye wrote: |
I'm not sure if the FileInput node would work with this or if it would still detect the "hidden" file. |
FileInput doesn't detect hidden files.
joebuckeye wrote: |
you are up to playing directory games to prevent the file from being read before the FTP is complete. |
Most shops in my experience prefer this as they "reserve" hidden files for system use. Or at least prefer business data to be visible in an intermediate directory to inexperienced staff at 3am in case of emergency, preventing "the file's gone missing" calls that have to be recanted later.
But it's a different road to the same destination and both are valid. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
qyh001 |
Posted: Mon Nov 01, 2010 5:28 pm Post subject: Re: FileInput Node issue |
|
|
Newbie
Joined: 01 Nov 2010 Posts: 2
|
Vitor wrote: |
You can write the file to an intermediate directory & when it's complete move it to WMB's input directory. How you detect the file's complete & move it is an exercise for the reader, as is how you detect partial transfer failures & other issues.
Alternatively you can use WMQ rather than a file to move the data & solve all your problems in one fell swoop. |
Thank you for your suggest ,and now i have other issue,
When data not complete i use fileInput node receive a part file to process application,
but when message flow use part file process complete, FileInput Node Move File to Archive subdirectory(mqsiarchive) is a 100% complete file ,
This is a issue: why the message flow receive the file is part file,but archive is a 100% complete file,
execute file and archive are not same size, i don't know why,
maybe the some Node's properties set not right?
My Nodes properties set parser timing is On Demand,
and set Transaction mode is No,
i don't ensure that properties in connection with this issue,
The two file are not same size, Who can tell me the reason?
Vitor ,can you give me some suggest for this case? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 01, 2010 7:01 pm Post subject: Re: FileInput Node issue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
qyh001 wrote: |
This is a issue: why the message flow receive the file is part file,but archive is a 100% complete file, |
The FileInput node will detect the part file arriving, open the the file and record the name. It'll process as much of the file as it finds & when it's done it'll issue OS commands to move that named file into the archive directory. By that time, the file's complete. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|