Partially Qualified File Transfer

As opposed to fully qualified File Transfers, partially qualified File Transfers can also transfer several files by using wildcard characters. This topic describes how you can define source and target file filters depending on the particular versions of the source and target Agents.

A File Transfer is partially qualified if one or several wildcard characters are used in order to specify the source and target file. The Use Wildcards option (Transfer Settings section on the File Transfer definition page) must also be activated. For more information, see File Transfers (JOBF).

The File Transfer protocol is decisive for the way wildcard characters are used.

Old File Transfer Protocol

The old File Transfer protocol is used if the source or target Agent are of an Automation Engine version below 9.00A.

Source Agent

source Agent in old file transfer protocol

To define the source file, you can use the wildcard characters * and/or ?. At least one wildcard character must be used.

"*" stands for any number of characters (including no character), "?" for exactly one. Fixed file name parts and wildcard characters form a filter which is used to retrieve the files that should be transferred.

Wildcard characters are always read from left to right. If the fixed part occurs several times in between wildcards in the source file, the filter applies as of the position at which the fixed part first occurs.

Example

Source: *a*a*.txt

Name of a source file that complies with the filter: abrahamastreet.txt

Notes:

  • In z/OS, the wildcard characters "*" and "?" must only be used once and not as the first character.
  • In OS/390, wildcard characters are not supported on GDG (generation data groups) files. However, you can use a script object with the prep_process_filename script function on the needed files with wildcards and start a JOBF for each returned file with the activate_uc_object script function.

Target Agent

target Agent in old file transfer protocol

In the target file, the wildcard character "*" must be used exactly once. It represents the source file's complete variable part starting with its first wildcard character (? or *) and ending with its last wildcard character (? or *).

Example

Source: ?C_SERVER_*_01.TXT

File that complies with the filter: UC_SERVER_LOGG_01.TXT

Target: TEST_*_A.TXT

Name of the target file: TEST_UC_SERVER_LOGG_A.TXT

 

Source: *_SERVER_*_0?.TXT

File that complies with the filter: UC_SERVER_LOGG_01.TXT

Target: TEST_*_A.TXT

Name of the target file: TEST_UC_SERVER_LOGG_01_A.TXT

New File Transfer Protocol

The source and target agent must be of Automation Engine version 9.00A or later.

Source Agent

source Agent in new file transfer protocol

See old File Transfer protocol.

Target Agent

target Agent in new file transfer protocol

To define the target file you can use the * character as often as you like. It represents the source file's complete variable part, starting with its first wildcard character (? or *) and ending with its last wildcard character (? or *).

Note that for each * character the system will insert all applying characters in the target file name from the first to the last source file's wildcard character. The built target file name can become very long.

Nine placeholders are additionally available that can be used to specify the target file. They refer to a particular wildcard character (?,*) in the source file name. These placeholders are composed of the & character and the numbers 1-9: &1, &2, &3,... &9.

The number specifies the wildcard location in the source that is addressed.

For example: Placeholder &3 is replaced by the source file name's characters that are retrieved by the third wildcard character in the source file specification.

Starting the file transfer results in an error if the source file's filter includes fewer wildcards than are addressed in the target specification. Each placeholder can be used in the target file as often as required.

Notes:

  • The wildcard characters * and &1, &2 ... &9 have different functions and can be used in parallel.
  • The wildcard character "?" must not be used in target file names.
  • It is advisable to use at least as many wildcards in the source and the target as are required in order to clearly identify the file name. Otherwise, the file transfer will try to create several target files of the same name in the same location. In this case, the action that is defined in the file transfer setting "File exists" is executed (cancel, overwrite, append).

Example 1

This example describes wildcard combinations that can be used in file transfers.

Source specification:   a?b*c?*?d*

Graphic depicting possible wildcard combinations for a File Transfer.

This table describes the source files that comply with the filter and their variable parts:

  File name &1 &2 &3 &4 &5 &6 *
1 a1b234c05670d.txt 1 234 0 567 0 .txt 1b234c05670d.txt
2 a2b345c17891d.txt 2 345 1 789 1 .txt 2b345c17891d.txt
3 a3b456c20903d.txt 3 456 2 090 3 .txt 3b456c20903d.txt

This is the target specification:

&2a*b&1c&2*&3d&6

This table lists the target file names that are created:

  File name
1 234 a 1b234c05670d.txt b1c 234 1b234c05670d.txt 0d.txt

2 345a2b345c17891d.txtb2c3452b345c17891d.txt1d.txt
3 456a3b456c20903d.txtb3c4563b456c20903d.txt2d.txt

Example

The following example reverts the date of the source file name in the target file name.

Source specification:

*????_*.*

This table describes the source files that comply with the filter:

  File name &1 &2 &3 &4 &5 &6 &7
1 20110307_report.txt 2011 0 3 0 7 report txt
2 20110220_overview.doc 2011 0 2 2 0 overview doc
3 20110111_script.txt 2011 0 1 1 1 script txt

This is the target specification:

&6_&4&5&2&3&1.&7

This table lists the target file names that are created:

  File name
1 report_07032011.txt
2 overview_20022011.doc
3 script_11012011.txt

See also: