Sterling Connect:Direct Integrated File Agent Variables

Sterling Connect:Direct File Agent Variables provide a flexible way to pass arguments to the Process that Sterling Connect:Direct Integrated File Agent submits. A variety of variables are available for file properties, date/time and other values.

When Sterling Connect:Direct Integrated File Agent submits the Process for a detected file, it first resolves any File Agent variable specified in the Build Value and assigns the result to the specified CD Substitution Variable. The CD Substitution Variable is then passed into Process submission, allowing the Process to perform its tasks, for example sending the detected file to a remote Sterling Connect:Direct node.

Observe the following rules when you specify File Agent variables:
  • The starting percent sign (%) and the ending period (.) shown with variables are required.
  • Enclose argument strings that contain special characters in double quotes.
  • Enclose spaces and vertical bars in double quotation marks to avoid problems when variables are passed to a Sterling Connect:Direct Integrated File Agent Process.

The following table describes the Sterling Connect:Direct File Agent Variables.

Usage Variable Description
All Operating Systems
Path and file %FA_0. to %FA_99. The number included in this variable represents a component of the name of the detected file, as delimited by the file delimiter, in sequence. For example, if the full file name is /usr/watch/test file.active.txt, then %FA_0. is usr, %FA_1. is watch, and so on.
%FA_FILE_FOUND. On Microsoft Windows and UNIX, the default value is the path and file name of the detected file.

On z/OS® systems, the default value is the entire name of the file that Sterling Connect:Direct® Integrated File Agent detected, including any member name. This variable supports PDSE long member names. For example, when you specify this variable, Sterling Connect:Direct Integrated File Agent could pass the following member name: CUST.BENEFITS(PAYROLLPDSELONGNAME).

On S3 object stores, the default value is the entire name of the object that Sterling Connect;Direct File Agent detected including the bucket name and scheme name. If a scheme name substitution occurred, this is the name after substitution. For the initial name see %FA_WATCHED_FILE_FOUND variable. For more details, refer Object Stores support.

%FA_FSTYPE. The file or object file system type. Windows, Unix, OS390, AWSS3
Current date and time %FA_DATE. The current date. This value has 8 characters that represent the year, month, and day, for example,(yyyymmdd), 20210805.
%FA_DATE2. The current date . This value has 6 characters that represent the year, month, and day (yymmdd), for example, 210805.
%FA_DATE_DAY. The current day, for example, 05.
%FA_DATE_MONTH. The current month, for example, 08.
%FA_DATE_YEAR. The current year, for example, 2021.
%FA_NUM. The millisecond timestamp. If multiple files are sent within the same second, they will likely get different millisecond values, for example, 13143512345, 13143512346, and 13143512347.
%FA_TIME. The current time. This value has 6 characters to represent the hour, minutes and seconds ( (hhmmss) using a 24-hour clock.
%FA_TIME_HOUR. The current hour, for example, 13.
%FA_TIME_MINUTES. The current minute, for example, 14.
%FA_TIME_SECONDS. The current second, for example, 35.
%FA_TIME_MS. The current millisecond, for example, 067.
Modification date and time %FA_FDATE. Date a detected file was last modified. This value has 8 characters to represent year, month, and day (yyymmdd), for example, 20210805.
%FA_FDATE2. Date a detected file was last modified. This value has 6 characters to represent year, month, and day (yymmdd), for example, 210805.
%FA_FDATE_DAY. The day a file was last modified, for example, 05.
%FA_FDATE_MONTH. The month in which a file was last modified, for example, 08.
%FA_FDATE_YEAR. Year in which a file was last modified (yyyy), for example, 2021.
%FA_FDATE_YEAR2. Year in which a file was last modified (yy), for example, 21.
%FA_FTIME. The time a file was last modified. This value has 6- characters representing hour, minutes, and seconds (hhmmss) using a 24-hour clock, for example, 153842.
%FA_FTIME_HOUR. The hour a file was last modified, for example, 22.
%FA_FTIME_MINUTES. The minute a file was last modified, for example, 24 will be passed for a file last modified at 6:24.
%FA_NUM2. A 5-digit number in the range of 00000..99999, for example 00345. The counter is always reset to 0 at File Agent startup and is increased by 1 on every process submission. The counter preserves its current value through a config refresh.
%FA_NUM3. A 9-digit number in the range of 000000000..999999999, for example 000012345. The counter is always reset to 0 at File Agent startup and is increased by 1 on every process submission. The counter preserves its current value through a config refresh.
%FA_FTIME_SECONDS. The second a file was last modified, for example, 35.
%FA_FTIME_MS. The millisecond file was last modified, for example, 067.
UNIX and Microsoft Windows only
File name and path %FA_EXT_FOUND. The file extension of the file that was added, for example, .txt.
%FA_EXT_FOUND_NP. The file extension of the file that was added, but without the period before the file extension.
%FA_NAME_FOUND. The name of the file that was added, for example, myfile.
%FA_NOT_PATH. The file name with the file extension, without any path. For example, if the full file name is /usr/watch/test file.active.txt, then %FA_NOT_PATH. is test file.active.txt.
%FA_PATH_FOUND. The path of the file that was added, for example, on Microsoft Windows, C:\watch\, and on UNIX, /home/user/watch..
Microsoft Windows only
  %FA_DRIVE_FOUND. The default value is the drive of the file that was added, for example, C:.
z/OS systems only
File and member %FA_BASEFILE_FOUND. The default value is the name of the file that was added, without the member name. This variable is only valid for PDS on z/OS operating systems, for example, CUST.BENEFITS
%FA_MEMBER_FOUND. The default value is "." This variable is only valid for PDS on z/OS operating systems. PDSE long member names are supported, for example, PAYROLLPDSELONGNAME.
S3 Object stores only
  %FA_SCHEME. This is the object scheme when Sterling Connect:Direct File Agent discovered the object.
  %FA_OUTSCHEME. This is the object scheme if a scheme substitution occurred. Without substitution the value is same as %FA_SCHEME.
  %FA_WATCHED_FILE_FOUND. When a scheme substitution occurred the value is the object name before substitution occurred, the object name Sterling Connect:Direct File Agent detected. For more details, refer Object Stores support.