on 04-03-2009 5:43 AM
Hi,
I have a job running which copies a file from remote server to my PI server. I have a file sender channel which picks up this file send it for further processing.
Is there a way to make sure that the file sender channel reads the file only after it has completely been copied from the remote server assuming that we dnt know what is the maximum time it could take to write the file.
Deepika,
Select the Advanced Mode option, then provide a proper Msecs to Wait Before Modification Check value.
According to SAP:
Msecs to Wait Before Modification Check
Enter the number of milliseconds that the adapter must wait before it checks whether the files have been changed.
This parameter is not available if you have selected File Content Conversion as the Message Protocoland then made an entry under Recordsets per Message that splits an input file into several messages.
Hope this helps.
Victor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In XI/PI we don't have option to find whether the file is completely copied or not. In your script itself write code to copy file frst to temp folder after that move again to axact folder. I hope this one will sortout your problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One more option is that you can schedule (Availability Time Planning in RWB) the Sender File communication channel for a specific time after all the files has copied from remote file to local XI folder.
So, the best solution I can suggest, is you need to plan to write a batch file to copy all the files to XI system and set the time in File adapter to pick the files after this.
Regards
Shankar
Hi Nallam,
As you suggested to write a script to copy everything in a temp folder and then move it to exact folder.
My problem still not get sorted.
For example i have 5 files that are being moved from remote server to my temp XI folder. After thay have been copied and i using my script move it to actual folder and i have set a polling time to say 10 secs.
Now, if according to polling time its already 10 secs. The channel will try to pull the files from that folder and send it to its reciever. What if while the channel is puuling out those files my script has finished copying only 2-3 files and 4th one is still being written. Wont the channel pick 4 files out of which the 4th one would be half completed.
Please correct me if i am wrong.
Hi,
Your script should move complete written file only from temp folder to final folder. Why because if the file is moved into final folder mean it should be 100% writtenable data file. Incomple file don't move to final folder. Whatever written activities in file should be do in tem folder itself.
write & copy statement functionality is different. Write mean writing data into file line by line, but copy mean transfering complete file into folder at a time,
I hope now clear.
Two options,
1. The script should write the file having set the indicator as read only. Only after it writes the file completely the read only option should be removed.
the option ● Process Read-Only Files (for transport protocol File System (NFS)) should be disabled
2. Use this option,
Advanced Mode
To specify additional parameters in the adapter configuration, set the Advanced Modeindicator.
● Msecs to Wait Before Modification Check
Enter the number of milliseconds that the adapter must wait before it checks whether the files have been changed.
This parameter is not available if you have selected File Content Conversion as the Message Protocoland then made an entry under Recordsets per Message that splits an input file into several messages.
Note
This parameter is applicable only for the File adapter. If you enter a value in this field when configuring the sender FTP adapter, it will have no effect.
All above solutions will work only if its NFS and not FTP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
move the file from where it is written to by source to a different folder and XI will poll that new folder OR just rename the file written by source and let XI poll that new file name....
both of these can be achieved manually or using a script
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check the possiblity of picking the file directly from the source Folder itself.
Otherwise if filename is going to same always this not going to be any problem because adapter tries to check the file if exists then only processes. but not safe i feel
I am not sure but check for option if file exists kind of validations possible otherwise need to write the module for this
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.