Copy Command Settings
The Copy command moves files from one host to another. Note that 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:
- Select connections under From and To.
- Specify an absolute or relative path for the file(s) on the source host using the Path field under From.
- Specify the target in the Path field under To.
- Respond to the fields on the Options tab described below.
- 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.
- 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.
- Erase transferred files on source
- Copy children folders and files
- Abort job when source file(s) not found
- If file exists on destination host
- 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
- 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.
The only two selectable connections in the drop-down lists are the ones selected in the From and To fields at the top of the FTP Job definition page, above the command sequence.
This field allows you to use * and ? wildcards. The * wildcard stands for any number of characters and the ? wildcard stands for one character. Wildcard characters form a filter which may be used to determine the files that will be transferred.
To copy all files: | Enter: |
---|---|
With a .txt extension |
*.txt |
Named report with any extension |
report.* |
Named quarter followed by a single character |
quarter? |
That are exactly four character long |
???? |
You can browse to a file or directory using the browse icon. When you click it, a pop-up dialog opens that allows you to browse to a file or directory on the host. For more information, see Browsing to Directories and Files.
To specify: | Enter: |
---|---|
A sub-directory for a single file or multiple files. |
The path to the sub-directory. For example: /home/logs |
A file name in a sub-directory for a single file. |
The path including the file name. For example: /home/logs/out.txt |
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.
You can browse to a file or directory using the browse icon. When you click it, a pop-up dialog opens that allows you to browse to a file or directory on the host. For more information, see Browsing to Directories and Files.
Transfer type (FTP only)
Sets the file type from the following options:
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:
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.
When checked, the transferred file(s) are erased from the source after the successful transfer.
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.
Sets the Job status to ABEND when a source file is not found.
Determines what should happen if a file exists on the target host with the same name as the file you are copying:
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:
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.
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.