cancel
Showing results for 
Search instead for 
Did you mean: 

File Sender Channel

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Viet,

I can't see "Msecs to Wait Before Modification Check" under Advanced Mode option.

I have not selected File Content Conversion as the Message Protocol rather i have selected file as the message protocol.

former_member206760
Active Contributor
0 Kudos

deepika,

also what u can do is try renaming your file..

i.e let source appl write a file with name say FILEA thn in XI sender channel mention FILEB..

so xi will not poll FILEA ....now after it is written..you cna manually change it to FILEB or write a script to do that

This wud wrk

Former Member
0 Kudos

Deepika,

If you selected the Advanced Mode check box, you must have found the Msecs to Wait Before Modification Check field.

Regards,

Viet

former_member192295
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

former_member192295
Active Contributor
0 Kudos

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.

Shabarish_Nair
Active Contributor
0 Kudos

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

former_member206760
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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