File Transfers (JOBF)
The File Transfer object is a powerful and flexible tool to define parameters to exchange any file from one system to another. For File Transfer objects to work, an Agent must be installed on the source computer and on the target computer respectively. 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.
If converting characters is required, this is automatically done using a Code Tables (CODE).
Object class: Executable object
Object type/Short form: JOBF
This page includes the following:
An File Transfer definition is made up of the following pages:
- Standard pages that are always available, no matter what type of object you are defining:
- Additional pages that are always available for executable objects:
- The object-specific page described here.
Notes:
- You can read and modify at runtime all settings that are specified in this page. For this purpose, you use script elements that access the object attributes. Activate the Display Attribute Dialog at Activation checkbox on the Attributes page to enable this function. In the script, the attributes are accessed at a later point in time.
- The status of the file transfer does not affect its return code. If, for any reason, a file transfer fails, the return code is still 0.
To Define a File Transfer Object
-
In the Source Settings section specify the file to be transferred and its origin.
-
Agent
Select here the name of the Agent where the file to be transferred is located. See Combo Boxes.
You can select an Agent or an Agent Group. Please take into account that Agent Groups can be either source or target but not both. For more information, see Agent Groups in File Transfers.
-
Login
Login object that contains the necessary information for the file transfer to be able to log on to the target system.
-
Code
Select the Code Table that is relevant for the Agent. When you enter a string, the find as you type function is available and list all hits containing the string you entered.
In addition to the available Code Table objects, this list contains further options that can be used to transfer Unicode files:
- <UTF-8>
- <UCS-2BE>
- <UCS-2LE>
If you select any of these, the Code dropdown list in Destination Settings is not available and a code template is set in File.
-
File
Replace the ghost text with the file name(s). You can also enter a path. You can use wildcard for the file name, but not in the path.
Partially Qualified File Transfer: Use a filter that comprises wildcard characters and fixed parts of the file name instead of specifying a complete file.
Take into account the following:
-
VMS
VMS agents do not resolve logical names. Specify here the directory and file name as, otherwise, the file cannot be found.
-
z/OS
The specification of z/OS files depends on the file system that you use (USS or Host). For example:
- USS file system (absolute path): /dir1/dir2/datei
- USS file system (relative path): ./dir1/dir2/datei
- Host file system: FLQN.DATASET.NAME
Important! On the USS file system file names have to be compliant to the EBCDIC International encoding. Otherwise file names on the target may not be correct
-
UNIX
Please refer to the Call API Unix for parameters to be used and conditions that apply to file transfers under UNIX agents.
-
-
File Attributes
Additional entries for file attributes. Which attributes you can specify depends on the object's operating system. Please refer to Platform Specific Features for details.
-
-
In the Destination Settings section specify the target of the transfer.
-
Agent
Select here the name of the agent to which the file will be transferred.
You can select an agent or an agent group. Please take into account that agent groups can be either source or target but not both.
-
Login
Login object that contains the necessary information for the file transfer to be able to log on to the target system.
-
Code
Select the Code Table that is relevant for the agent. When you enter a string, the find as you type function is available and list all hits containing the string you entered.
If you have selected UTF-8, UCS 2BE or UCS 2LE as code of the source file, this field is not available.
-
File
Replace the ghost text with the file name(s). You can also enter a path. You can use wildcard for the file name, but not in the path.
You can use the following variables in the target file name: &$SRC_AGENT#. The file transfer replaces this variable with the name of the file's original agent. For example:
C:\temp\&$SRC_AGENT#_test*.txt
Partially Qualified File Transfer: Use a filter that is composed of wildcard characters and fixed parts of the file name instead of specifying a complete file.
-
File Attributes
Additional entries for file attributes. Which attributes you can specify depends on the object's operating system. See Platform Specific Features for details.
If you have selected UTF-8, UCS 2BE or UCS 2LE as code of the source file, this field is not available.
-
-
In the Transfer Settings section specify the settings that will govern the transfer.
-
File Format
Select the format, how the file will be transferred.
-
Text
Activate this option button if the file is a text file
-
Binary
Activate this option if the file is a binary file.
-
-
Keep Original File Attributes
Select this option to keep the file attributes of the source file. The file attributes of the destination files are overwritten.
This option only works if:
- both the source and the destination platform comply
- the new file transfer protocol is used (source and target agent are of Automation Engine version 9.00A or later).
Important!
- In BS2000, OS/400 and z/OS, you cannot overwrite the original attributes with additional specifications in the File Transfer object (target). Any attempt to do so results in an error message and the file transfer fails.
- In z/OS, setting this option in conjunction with files that are located on tape/VTL is not supported. This option requires the dataset to be on a disk.
It is recommended to activate this setting because the target file can become corrupt if the attributes are not sent or modified when you transfer text files between two OS/400 computers.
-
Compression
Select whether transferred files are compressed:
-
Default value:
Applies the value that has been defined in the in the UC_HOSTCHAR_DEFAULT (setting FT_COMPRESS) Agent variable. The files are transferred in compressed mode if the two agents have different settings. For example:
WIN01 = No compression
UNIX01 = Active compressionThe files are transferred in compressed form.
The Agent uses the LZP+Huffman procedure for the compression.
Note: When using compression, make sure that effort (time required for compression) and benefit (gain of time because of reduced transfer time) are balanced against each other. An important component for your decision is the available bandwidth of your network connection. You cannot increase performance with fast networks (100 Mbit) because the compression process is more time-consuming than the gain achieved by reducing the network time. With an available bandwidth of 10MBit or less, compression will definitely result in a performance increase.
- Yes: Files are compressed
- No: Files are not compressed
Yes and not overwrite the value defined in the agent/system variable
-
-
If file exists at destination
Select the action taken, if the file already exists at the destination. You can:
-
Cancel transfer
If the file already exists in the target system, the transfer is canceled.
-
Overwrite file
If the file already exists in the target system, the file is replaced by the one that is being transferred.
-
Append file
If the file already exists in the target system, the file that is being transferred is appended to the existing one.
-
-
Erase Source File
Select this option if you do not want to keep the original file at the source system.
Important!
- Specific rights are required under UNIX if this file should be deleted. See Rights for Deleting Source Files in File Transfers.
- A File Transfer also ends with the status ENDED_OK if all files have been successfully transferred but the source file could not be deleted.
-
Use Wildcards
Activate this option to be able to transfer files using wildcard character:
- Abort at First Error: If an error occurs during the transfer, the file transfer stops.
- Include Sub-Directories: The content of sub-directories is also transferred.
- Transfer Complete Folder Structure: All contents are transferred.
-
File Transfer Procedure
The Automation Engine sends the complete File Transfer request to the source Agent. This request also includes wildcard specifications in partially qualified file transfers. The source Agent is responsible for resolving this request and retrieving the files that should be sent.
Establishing a Connection
-
The source Agent (sender) first tries to establish a connection to the target Agent (receiver).
- If it succeeds, it transfers the files to the receiver.
- If it fails, the sender notifies the Automation Engine.
- The Automation Engine sends the file transfer request to the receiver, which tries to establish a connection to the sender. When the connection is established, the receiver transfers the request to the sender.
Checking the Disk Space
Depending on the OS, the Automation Engine system checks the disk space on the target platform before it starts the file transfer. If there is not enough disk space, it is allocated.
-
BS2000
The estimated disk space that is required is allocated when the option Keep Original File Attributes is activated in the File Transfer object.
-
NSK
Disk space is not checked.
-
OS/390
Native file system: Disk space is allocated by using the attribute SPACE for the target of the file transfer.
-
OS/390
USS file system: Disk space is not checked.
-
OS/400
- Native file system: Disk space is allocated if either Keep Original File Attributes is set or the attribute SIZE is specified for the target.
- IFS file system: The available disk space is checked.
-
UNIX
Depends on what is specified in the
ft_check_free_disk_space=
INI file parameter. -
VMS
The available disk space is checked.
-
Windows
Depends on what is specified in the
ft_check_free_disk_space=
INI file parameter.
Handling File Transfers
Each File Transfer establishes its own connection between the Agents. The files are always sent one after the other and, if the affected Agent supports this functionality, each file transfer is handled in a separate thread or process. This means that several file transfers are handled independently.
The Agents of the following operating systems support threads:
- OS/400
- Unix
- Windows
- z/OS
NSK handles each file transfer with a separate process. Therefore, the NSK Agent has a second port that is specifically used for file transfers.
Note: File Transfers continue even if a connection error occurs between the Automation Engine and the Agents. When the connection is re-established, the actual status of the File Transfer is sent to the Automation Engine.
Checks to Ensure Reliable Transfers
The following procedures ensure the reliable transfer of files:
-
Transmission security
The accuracy of transferred data is verified with an MD5 checksum verifier that is embedded in the data stream. Data is verified in packets.
-
Consistency check for restarted File Transfers
You cannot repeat individual file transfer files selectively. Erroneous File Transfers can be repeated from the last restart point.
At particular intervals, the Agents automatically create restart points while the files are being transferred (setting FT_RESTARTINFO_INTERVAL in the system variable UC_HOSTCHAR_DEFAULT - Host Characteristics). The Agent stores this information locally on its computer in status store files. If an error occurs, the File Transfer can be restarted from the file last restart point (restart option From last restart position). This function saves time especially if most of a huge file has already been transferred.
To ensure that the target file complies with the source file after it has been successfully restarted, the transferred data is checked against an MD5 checksum. When it creates the restart point, the system also retrieves the MD5 checksum and stores it in the status store file. The checksums differ if the partially transferred file has been changed on the computer of the receiving agent. In this case, the restart results in an error.
Notes:
- Use the FT_RESTARTINFO_LIFETIME and FT_RESTARTINFO_CHECK settings in the UC_HOSTCHAR_DEFAULT system variable to specify that status store files should be deleted.
- To save transmission time, MD5 checksums of files that are smaller than 1 MB are not calculated.
- You can deactivate the MD5 checksum by using the setting FT_USE_MD5 in the system variable UC_HOSTCHAR_DEFAULT.
Status Store Files
Depending on the Agent platform, the status store files are stored in the following directories:
-
Windows
-
Directory: The Temp directory of the Agent.
-
File name: FTNNNNNNN.sts
NNNNNNN is the file transfer's RunID that has been converted to a 7-letter string. You can use the ALPHA2RUNNR script element in order to convert it to the regular 10-digit RunID.
One status store file per file transfer.
-
-
BS2000
-
Directory: The Temp directory of the Agent.
-
File name: FTNNNNNNN.sts
One status store file per file transfer.
-
-
UNIX/VMS
-
Directory: The Temp directory of the Agent.
-
File name: FTNNNNNNN.sts
One status store file per file transfer.
-
-
OS/400
-
Directory: Depending on the
store_type=
parameter in the Agent OS/400 INI file. -
File name: IFS: FTNNNNNNN.sts
QSYS: Object with the name FTNNNNNNN and the type USRSPC
One status store file per file transfer.
-
-
NSK
-
Directory: Sub-volume in the configuration file (see the NSK agent installation).
-
File name: As defied in the Agent NSK INI file, section [FT-STATUS-STORE].
Four Status store files that include all restart information
-
-
z/OS
-
File name: Status store dataset. For more information, see Installing the Agent for z/OS.
A Status store dataset that includes all restart information
-
You can also specify file attributes for the file names of file transfer target:
- BS2000 Agent - File Transfer Support
- z/OS Agent - File Transfer Support
- Agent - Interaction Between Automation Engine and NSK
- OS/400 Agent - File Transfer Support
- UNIX Agent - File Transfer Support
- VMS Agent - File Transfer Support
- Windows Agent - File Transfer Support
Next steps:
Executing the Object
File Transfer objects can be included in Schedules (JSCH) and thus be executed automatically at predefined dates or intervals. Likewise, they can be part of workflows (see Designing Workflows (JOBP)).
You can also execute, restart or stop them manually. For details see Executing File Transfers.
Monitoring the File Transfer
Immediately after executing the object you can start monitoring it. Right-click it to select Monitoring and open the pre-filtered list of tasks to display this one. See Show in Process Monitoring.
In the Process Monitoring perspective you can follow their progress and access the reports and statistical information associated to them. See Working with Tasks.
See also: