Use of the batch file

How to use the batch mode operation of the IBM Spectrum Archive™ Copy Tool.

The batch mode operation of the IBM® LTFS Copy Tool allows it to be used for large, complex copy transactions. The batch transaction is specified by using a ltfscpspec file. A batch job can include multiple source and destination paths, individual file specifications, and configuration parameters for the job. The format of the batch file contains two main sections: parameters and data. More detail about each section is provided below. Refer to the topics Example batch files on a Linux system and Example batch files on a Windows system to review sample batch files and an explanation of each file.
Notes:
  • The settings in the <params> section of the batch file can be overridden by the command line options.
  • The recursive option in the <params> section is enabled only when the <srcspec> tag includes the wildcard characters ("*" or "?").
The following example shows the format of a batch XML file:
<?xml version="1.0" encoding="UTF-8"?>
<ltfscpspec version="1.0">
 <params>
  [parameters]
 </params>
 <data>
  <file>
   <srcpath>path</srcpath>
   <dstpath>path</dstpath>
   <srcspec>expression</srcspec>
   <sf>filename</sf>
   <sf rename="newname">filename</sf>
  </file>
  <file>
   ...
  </file>
 </data>
</ltfscpspec>

Parameters

The params section of the batch file contains optional parameters that can be set. The parameter names are the same as in the command line, except for the leading dash (-), which is omitted in the batch file.

Synopsis
<param-name>param-value</param-name>
Example
<total-buffer-size>800M</total-buffer-size>
Note: The options that can be specified in the data section of the batch file cannot be used in the parameter section of the file. Those options encounter an error if they are specified in the data section. Parameters that are specified in the parameter section might be overridden by the command line options if they are specified in both sections.

Data

The data section has one or more file sections that specify a destination for one or more source files. Each file section contains the following specifications.
<srcpath>
The tag contains the path for the location of the source files (same as –srcpath in the command line).
<dstpath>
This tag contains the path for the destination to where the files are to be copied (same as –dstpath).
<srcspec>
This tag contains a search expression or filter that describes the set of files to be copied. The expression can include the * and ? wildcard characters. For example, the following line searches all "dpx" files:
<srcspec>*.dpx</srcspec>
Likewise, the following line searches all mpg files that start with ‘clip:’
<srcspec>clip*.mpg</srcspec>
<sf>
This tag contains one source file name (this tag has no command line equivalent). Optionally, a target file name can also be specified as the rename attribute of the <sf> tag. For example, <sf rename=”newname”> specifies the destination file name. This function enables the renaming of files during the copy process.
Note: One srcpath and one dstpath is required in each file section. In addition, at least one srcspec or sf must be defined in each file or the ltfscp fails.