Executing File Transfers

This topic provides detailed information on what happens when File Transfers are executed.

This page includes the following:

Overview

Converting Character Sets

Exchanging data between different system platforms requires the character sets to be converted. This is done automatically using the Code Tables (CODE). The transfer can be structured, thus enabling the exchange of files with packed and binary fields in heterogeneous system environments. All network transfers are encoded by default.

Agent Connection

For each file transfer, a separate connection is established between the Agents. Agents for the OS/400, Windows, Unix, z/OS and NSK operating systems handle File Transfers through extra threads. When a File Transfer has ended, the corresponding connection is automatically closed. If there are still open and unused connections, they are closed after the period of time that is defined in the FT_CONNECTION_TIMEOUT key (variable UC_HOSTCHAR_DEFAULT, see UC_HOSTCHAR_DEFAULT - Host Characteristics).

The old file transfer protocol is used if one or both of the affected Agents use Automation Engine version 8.00A or earlier. In this case, only one connection is established between the agents for all File Transfers. The system checks if a connection has already been established between the two Agents before a File Transfer starts. If so, this connection is used and no attempt is made to establish a separate connection. After the File Transfer has ended, the system ensures that a connection that is still used is not closed.

Notes:

  • (Windows and UNIX) No error message is displayed if empty files are transferred.
  • (Windows) Problems can occur in file transfers when the Windows Agent starts from a UNC path because your mapped files (StatusStore) cannot be used (for example, the Agent can crash).

    Recommendation: Start the Agent either from a local directory or by specifying an absolute local directory in the UC_EX_PATH_TEMP Agent variable in the Agent INI file.

  • For file transfer optimization you can specify parameters for the size of the TCP/IP buffer in some Agents. The administrator can do so in the [TCP/IP] section of the INI file.

Transferring Files

Each File Transfer stars by establishing a connection between the source and the destination. There are two methods of transferring files:

  • With a temporary file that is created in the destination folder

    The file to be transferred gets a name in the destination system. This name is comprised of a T and a string of 7 alphanumeric characters, for example TAAFLEFM. The string is derived from the File Transfer RunID, which ensures that the file name is unique. The RunID is converted into this string using the RUNNR2ALPHA script function.

    In the new FT protocol, a separator and a file ID are appended in addition to the string. Doing so makes a distinction possible because all files are handled via the File Transfer RunID.

    After the File Transfer has been executed successfully, the file gets the name specified in the File Transfer object.

    See also ALPHA2RUNNR.

  • Without a temporary file

    The file to be transferred has the name that is specified in the File Transfer object.

Notes:

  • The method used in File Transfers is defined in the INI file of the destination Agent (parameter ft_temp_file=).
  • A temporary file is not created if the File Transfer extends or overwrites an existing file but the new content is inserted directly in the relevant files.

Advantage of Temporary Files

  • Handling further processing steps is easier because the files only get their specified names after they have successfully been transferred.
  • If an error occurs, the temporary file is deleted in the destination system. Files that could not be transferred completely are not removed on UNIX and Windows computers. Therefore, the Agent does not have to start the File Transfer anew in case of restarts. For more information, see Restarting File Transfers.

Temporary Files on the File Structure of the Source Agent

Each time a source Agent does a File Transfer, it creates two temporary files:

  • a status store file with .sts extension
  • a file transfer report with a .ftx extension.

The location of these files is defined by the UC_EX_PATH_JOBREPORT variable set in the [VARIABLES] section of the Agent INI configuration file.

The Agent uses these files to reconstruct the File Transfer if the Agent is restarted or if a transfer fails. If the File Transfer completes successfully, the files are automatically deleted. If the File Transfer fails to make a restart, the files remain on the file system. The number of days the status files remain is defined by the value of the FT_RESTARTINFO_LIFETIME key in the UC_HOSTCHAR_DEFAULT variable.

For more information, see List of Agent Variables and UC_HOSTCHAR_DEFAULT - Host Characteristics.

Agent Groups in File Transfers

In a File Transfer it is possible to select an Agent Group either as source or as target. It is not possible to select an Agent Group in both. This results in the following two scenarios:

  • File Transfers from a single Agent to many target Agents (Agent Group).
  • File transfers from many Agents (Agent Group) to a single target Agent.

    Important! The files cannot have the same name. Otherwise, the File Transfer either overwrites the files or it cannot transfer the file if it is being deployed by parallel processes at that point in time.

    To avoid this problem, insert the following variable in the target file name: &<FT_SRC_HOST>.

    The file transfer replaces this variable with the name of the file's original Agent.

    For example:

    C:\temp\&<FT_SRC_HOST>_test*.txt

End Status

Transferring a Particular File

A File Transfer has the status ENDED_NOT_OK if the relevant file is not available.

Transferring Files Using Wildcard Characters

A File Transfer hast the status ENDED_EMPTY if no file is available that complies with the filter specifications. It has the status ENDED_OK if at least one matching file is found.

UNIX

For security reasons, it is recommendable that the login_check=yes parameter is set to yes in the INI file of the UNIX Agent. With this setting, the password specified in the login object assigned to the File Transfer is checked. If login_check=no is set, only the user name is checked.

VMS

In VMS, each text file requires that a delimiter is appended. The FileEndDelimiter= parameter in the INI file parameter FileEndDelimiter= determines whether the VMS Agent should append one. For more information, see Call API VMS.

See also: