fteListTemplates: list available MFT transfer templates
Use the fteListTemplates command to list the available Managed File Transfer transfer templates on a coordination queue manager.
Purpose
This command lists either all template names or a filtered selection of template names. The output format of the list can be any of the following:- Template names only (default behavior)
- Template names with a summary of the templates (verbose mode)
- Complete XML message describing the templates (-x and -o parameters)
This command uses the coordination.properties file to connect to the coordination queue manager. For more information, see The MFT coordination.properties file.
Specify the optional -p parameter for this command only if we want to use a set of configuration options different from your default set. See Configuration options for more information.
Syntax
fteListTemplates
Parameters
- -p
- Optional. This parameter determines the set of configuration
options to use to delete the template. By convention use the name
of a non-default coordination queue manager as the input for this
parameter. The command then uses the set of properties files associated
with this non-default coordination queue manager.
If we do not specify this parameter, the set of configuration options based on the default coordination queue manager is used.
- -v
- Optional. Specifies verbose mode and provides a short summary
of each matching template. This parameter is ignored if you have also
specified the -x parameter.
The -v parameter includes a summary of each template. For example:
Template Name: STANDBY Source Agent Name: AGENT1 Source QMgr: QM_JUPITER Destination Agent Name: AGENT2 Destination QMgr: QM_NEPTUNE Transfer Priority: 0 Transfer file specification File Item Details Mode: binary Checksum: MD5 Source File: C:\payroll_reports\*.xls Recursive: false Disposition: leave Destination File: C:\payroll_backup\*.xls Type: file Exist: error
If we do not specify the -v parameter, the default output mode is to list the matching templates names.
- -x
- Optional. Provides an XML-formatted message for each matching template. This parameter is ignored unless you also specify the -o parameter.Attention: The XML-formatted messages are not compatible with the fteCreateTemplatecommand tools.
- -o (directory_name)
- Optional. Sends the XML formatted-message to files in the named directory. One file for each template is created and each file has the same name as the template with an .xml suffix. This parameter is ignored unless you also specify the -x parameter.
- -f
- Optional. Forces any existing output file to be overwritten. This parameter is ignored unless you also specify the -o parameter. If we do not specify -f but you do specify the name of an existing output file, the default behavior is to report an error and continue.
- -mquserid (userID)
- Optional. Specifies the user ID to authenticate with the coordination queue manager.
- -mqpassword (password)
- Optional. Specifies the password to authenticate with the coordination queue manager. We must also specify the -mquserid parameter. If you specify -mquserid, but do not specify -mqpassword, we will be prompted to supply the associated password. The password will not be displayed.
- (template_names)
- Optional. A list of one or more template names to be listed.
A template name can include an asterisk as a wildcard that matches
zero or more characters. Depending on your operating system, you might
need to enclose any template names that include wildcard character
in quotation marks (" ") or single quotation marks (' ') to avoid
shell expansion. Shell expansion can cause unexpected behavior.
If we do not specify anything for template_names, the default is to list all templates.
- -? or -h
- Optional. Displays command syntax.
Example
In this example, all the templates with names starting with ST are listed:fteListTemplates "ST*"This example creates the template STANDBY as an XML-formatted message to the file STANDBY.xml in the current directory:
fteListTemplates -x -o . STANDBYThis command creates the following output in STANDBY.xml:
<?xml version="1.0" encoding="UTF-8" ?> - <transferTemplate id="1864c1dd-ba02-4b34-bda9-dc6862448418" version="3.00"> <name>STANDBY</name> <sourceAgentName>AGENT1</sourceAgentName> <sourceAgentQMgr>QM_JUPITER</sourceAgentQMgr> <sourceAgentQMgrHost>null</sourceAgentQMgrHost> <sourceAgentQMgrPort>-1</sourceAgentQMgrPort> <sourceAgentQMgrChannel>null</sourceAgentQMgrChannel> <destinationAgentName>AGENT2</destinationAgentName> <destinationAgentQMgr>QM_NEPTUNE</destinationAgentQMgr> - <fileSpecs> - <item checksumMethod="MD5" mode="binary"> - <source disposition="leave" recursive="false"> <file>C:\payroll_reports\*.xls</file> </source> - <destination exist="error" type="file"> <file>C:\payroll_backup\*.xls</file> </destination> </item> </fileSpecs> <priority>0</priority> </transferTemplate>
Return codes
- 0
- Command completed successfully.
- 1
- Command ended unsuccessfully.
Parent topic: MFT commands
Related reference
Related information
- Work with file transfer templates
- Create a file transfer template using IBM MQ Explorer
- Backing up a file transfer template definition