Question:

We would like to schedule file transfer from Application A (Solaris) to Application B (AS400), where Application A generates files with a timestamp ABC_25042014.txt in folder D:/A_Folder/.

This folder will contain a number of files - typically 25 - and YADE must only transfer those files with a timestamp for the current day and deliver them to Application B after they have been created.

The time at which the files to be transferred are created is not fixed and can be any time in the day.

The file size is around 100MB.

Answer:

File Selection:

YADE uses regular expressions, with an extension for timestamps. File selection should be specified using the file_spec parameter with a variable part for the timestamp.

For example:

    file_spec=^ABC_[date:ddMMyyyy].\txt$

This file_spec value will select all files in the source_folder (and in subfolders, if the recursive parameter is set to true) that contain the current date in the filename. It is not required to adjust this parameter every day

File Generation:

  • if the time when the file is created is not fixed then a "file polling" could be specified. This is done by setting the poll_* parameters as shown, for example, for Server-to-Server File Transfer in our "Server to Server Transfer with Polling" FAQ. You can achieve a reliable solution using this approach together with the "steady state" function as described in our "Check File for completeness Steady state" FAQ.
  • If the file names e.g. in your AS/400 system use a different syntax to the file name in the Solaris system then YADE will be able to rename the files on the target server if the target_replace and target_replacing parameters are correctly set. A rename at the source, after transfer, could be possible as well.
  • This solution works for FTP, FTPS and SFTP and for any other YADE data provider.

See also