File names, file patterns, paths, system constants and variables

UNC Paths


UNC paths are only allowed in phase 1 (Input Agent "File") and phase 6 (Response "File"). Hidden shares are not allowed, furthermore the use of UNC paths is not supported for file events and in postexecuter classes. Please do not use UNC paths in any other place. See also section Accessing external shares. Please also note that virus scanners on the machine providing shares can cause problems regarding access to these remote files. This is not a problem of the software itself, but can then show up as an error there.

Input (phase 1)


Variables and system constants (in file name patterns, in phase 1)


The content of variables with prefix MSG_CALL_ can be referenced in file names with the placeholder @MSG_CALL_VAR_NAME@.

For system constants, however, use the placeholder %CONST_NAME%.

Note: This analogously applies to other fields (e.g. for directories) where you see the symbol %. This button also displays a selection list.

Placeholders (in file name patterns, in phase 1)


In file patterns, an asterisk * can be used as a wildcard. The asterisk stands for 0-n arbitrary characters. So the file pattern XY* accepts all files whose names begin with XY.

The most commonly used operating system is Windows, so the file pattern processing has been aligned with Windows' file pattern processing. For example, in Windows the command dir XY *.* provides all files starting with XY, even if the files do not contain a dot.

The placeholders for the current date and/or time are allowed in file patterns (see above). If the file pattern is <yyyy-MM-dd>.txt and the current date is 23.04.2017, then all files with names ending with 2017-04-23.txt will be accepted.

Regular expressions (as file name pattern, in phase 1)


If the file pattern begins with the prefix "regex:", it will be interpreted as a regular expression. But this is only useful when accessing a file system, because FTP servers, for example, do not support regular expressions. For multiple regular expressions see next paragraph.

All files that do not end with "txt" (in any lowercase and uppercase combination), could, for example, be described with the following regular expression.

.*\.(?!(([tT][xX][tT])$)).*

Multiple file patterns (in phase 1)


In some cases, it is possible to specify multiple file patterns. To do so, the file patterns are separated with the pipe character (|). So the file pattern *.csv|*.txt accepts all files ending in .csv and .txt. Attention: If multiple file patterns are allowed, then obviously the delimiter must not appear in the file pattern itself, even if only a single file pattern is specified. This also applies to regular expressions specified with prefix regex:. You can avoid this by using prefix regex2: instead. The pipe character will then be interpreted as part of the regular expression, which also means that only a single regular expression can be specified.

Output (phase 6)


Variables and system constants (in file names, in phase 6)


The content of all variables can be used with the placeholder @VAR_NAME@ in file names. Note: All entries @xxx@ (e.g. for file names, subjects, paths, etc.) are trimmed individually. {--@xxx@--} or entries in angle brackets (for example, <file>) are not trimmed. Only one of the notations can be used, depending on the location

For system constants, however, use the placeholder %CONST_NAME%. Important note: If you use the placeholder %yyyyMMdd_HHmmss_COUNTER%, it will be resolved to <yyyy><MM><dd>_<HH><mm><ss>_<n><n><n><n><n> (see following section). The number range placeholder <n> will only be resolved correctly if <n> is already used somewhere else in the Response (e.g. in the base file name)!

Note: This analogously applies to other fields (e.g. for directories) where you see the symbol %. This button also displays a selection list.

Placeholders (in file names, in phase 6)


File names can be generated using placeholders. The placeholders are filled at runtime. The following placeholders are allowed.


Placeholder

Description

<n>

Returns a sequential number of an internal number range that is unique to this profile.

<yyyy>

Placeholder for the year (4 digits).

<yy>

Placeholder for the year (2 digits).

<MM>

Placeholder for the month (2 digits).

<w>

Placeholder for the calendar week.

<dd>

Placeholder for the day of the month (2 digits).

<hh>

Placeholder for the hour (2 digits, 12 hours).

<HH>

Placeholder for the hour (2 digits, 24 hours).

<mm>

Placeholder for minutes (2 digits).

<ss>

Placeholder for the seconds (2 digits).

<S>

Placeholder for milliseconds (1 digit).

<file>

Placeholder for the input file name with file extension.

<file-prefix>

Placeholder for the input file name without file extension.

<basefile>

Base file name from the general settings in the Response. Of course, this does not work for the base file name field itself.

<lines>

Number of lines in the output file. Can be used for the output formats "CSV", "Excel" and "Fixrecord".

Note: If in a Response the content is set to "as received", the value for <lines> will not be set correctly. Instead, the system variable VAR_SYS_LINES can be used.

<asm-name>

Name of an ASM entry. See section "ASM Execution".

<asm-job>

The job number of an executed ASM entry. See section "ASM Execution".


Examples:


<file><n>.txt

Input file name with an attached number from the profile's internal number range and file extension ".txt".

<file><n><n><n><n>

Input file name with an attached (at least) 4-digit number of the profile's internal number range.

<yyyy><MM><dd>_<n>

8-digit date with an attached number from the profile number range, separated by an underscore.

Paths (in phase 6)


In some fields, a file name including the path must be entered. The following should be noted.


  • You should always use a slash / and not a backslash \. The separator is converted at runtime, depending on the underlying operating system.

  • Absolute paths should always be started with a leading slash /. In this case, the corresponding mount point above the installation directory of the Integration Server is looked for (for example C: or D: under Windows or /applications under Linux/Unix). If the directory structure is created appropriately, profiles can also be exchanged between different operating systems.

  • Relative paths (path information relative to the installation directory of the Integration Server) can be addressed using ./ (note the dot before the slash). This solution also allows a simple exchange of profiles between different operating systems, given a suitable choice of the directory structure.