FTP Jobs: Copy Command Settings
The Copy command moves files from one host to another. When running Copy commands from the Agent file system to an FTP server host specified with an FTP Connection object, the FTP Agent issues the get or put commands.
There are no get and put commands in the user interface. Whether a get or put FTP command is issued is determined by which connections are selected as the connections under From and To.
To Copy Files
-
In From/To select the Connection objects that connect to the source and destination hosts.
-
Drag the Copy command from the left pane and drop it onto the editor in the middle.
-
In the From section, do the following:
-
Connection displays the connection object that you have selected at the top of the editor for the source host. Here you can flip the direction in which the files are transferred.
-
In Path, specify an absolute or relative path for the file(s) on the source host. You can use * (any number of characters) and ? ()one character) wildcards here.
Examples:
-
*.txt copies all files with a .txt extension.
-
report.* copies all files called report with any extension.
-
quarter? copies all files called quarter followed by a single character.
-
???? copies all files that are exactly four characters long.
-
-
Click the browse icon to open a dialog where you can search for a file or directory on the host. For more information, see Browsing to Directories and Files.
-
-
In the To section, specify the target.
-
To specify a sub-directory for a single file or multiple files, enter the path of the sub-directory. For example: /home/logs.
-
To specify a file name in a sub-directory for a single file, enter the path including the file name. For example /home/logs/out.txt.
Important!The path in the Path field must already exist. The Copy command does not create sub-directory. To create a new sub-directory, add a Create Directory command before the Copy command.
-
-
In the Options section specify the following:
-
Transfer type (FTP only)
Sets the file type from the following options:
- ASCII: Sets the mode of file transfer to ASCII.
- BINARY: Sets the mode of file transfer to binary.
- IMAGE: Sets the type to image where the data are sent as contiguous bits which, for transfer, are packed into the 8-bit transfer bytes.
- EBCDIC: Sets the type to EBCDIC to use EBCDIC for their internal character representation.
- LOCAL: Sets the type to local where the data is transferred in logical bytes of the size specified by the obligatory second parameter, Byte size.
This setting only applies to Jobs where FTP is the protocol specified for the Connection object. Note that the Connection object for a Job can be set with an Automation Engine variable and the attributes of the Connection object can be overridden with a :PUT_ATT command.
-
Data transfer mode (SFTP only)
Determines the transfer mode:
- STREAM: Data is sent as a continuous stream, relieving FTP from doing any processing. Rather, all processing is left up to TCP. No End-of-file indicator is needed, unless the data is divided into records.
- COMPRESSED: Data is compressed using a single algorithm (usually run-length encoding).
- BLOCK: FTP breaks the data into several blocks (block header, byte count, and data field) and then passes it on to TCP.
This setting only applies to Jobs where SFTP is the protocol specified for the Connection object. Note that the Connection object for a Job can be set with an Automation Engine variable and the attributes of the Connection object can be overridden with a :PUT_ATT command.
-
Erase transferred files on source
When checked, the transferred file(s) are erased from the source after the successful transfer.
-
Copy children folders and files
When checked and a * wildcard is used, sub-directories of the source path are searched for matching files to copy and they are placed in the same sub-directory on the destination host.
-
Abort job when source file(s) not found
Sets the Job status to ABEND when a source file is not found.
-
If file exists on destination host
Determines what should happen if a file exists on the target host with the same name as the file you are copying:
- Skip file: Does not copy the file.
- Skip file, raise 'on failure' condition: Does not copy the file and sets the 'on failure' flag as described in the On Failure field below.
- Append file: Appends the contents of the copied file to the existing file.
- Overwrite file: Overwrites the file.
-
On Failure
Determines the behavior when the Copy command fails.
Aborting a command sets an 'abort failure' flag that can be read by If Failure or If Successful command, but it does not change the Job status. Aborting the Job sets its status to ABEND.
Details for each option are described below when a copy command fails:
- Copy remaining files and abort the command: Designates the command as aborted and copies any remaining files in the command.
- Copy remaining files and abort the Job: Sets the Job status to ABEND and copies any remaining files in the command.
- Skip remaining files and abort the command: Designates the command as aborted and skips any remaining files in the command.
- Skip remaining files and abort the Job: Sets the Job status to ABEND and skips any remaining files in the command.
-
- For z/OS Jobs only, respond to the fields under z/OS.
- Block size
- Record length
- Record format
- Record descriptor word
- Space unit
- Primary storage
- Secondary storage
- Partition directory block
- Optionally add a description of the command under Description.
z/OS fields are described below.
The block size (BLKSIZE).
This is the number of bytes per record (LRECL).
The type of records contained in this data set (RECFM).
True or false to record the descriptor word.
Use tracks or cylinders for space units.
The primary space allocation number.
The secondary space allocation number.
The partition directory block number.
For more information on z/OS settings, see your z/OS documentation.
The Description field acts as comment in the command sequence, and is not written to the Job report. To write a message to the Job report use an Echo command. For more information, see FTP Jobs: Echo Command Settings.
Browsing to Get Information for MVS Mainframe Data Transfers
To transfer data from/to an MVS mainframe FTP server, you must use free form commands. However, you can browse in an FTP Job to help you define the commands.
When working with an MVS mainframe FTP server, the FTP Jobs will not allow you to browse to datasets. This is because of the MVS mainframe FTP server file system architecture. Browsing will display portioned datasets as directories. However, double-clicking a dataset will not "enter" the directory. You can work around this by manually entering a search pattern that is allowable for all members. For example, to view all maps in all cities under test for all members, you might enter TEST.CITY.MAPS(*). This will allow you to figure out a particular member name or dataset name to use it in your Job definition. For information on MVS mainframe file system architecture, see your mainframe documentation.
See also: