Microsoft Windows or UNIX Process Arguments Example

The following example demonstrates the operation of Sterling Connect:Direct® File Agent variables as Process arguments on a Sterling Connect:Direct server running UNIX.

The following arguments were specified in the Default arguments field of the configuration:

&F="%FA_FILE_FOUND."

The variable &F must be included in the default Process to perform the necessary tasks after the Sterling Connect:Direct File Agent detects a new file.

When the file payroll.txt appears in watched directory home/watch1/, then Sterling Connect:Direct File Agent passes the following argument string to the default Process: &F=/home/watch1/payroll.txt.

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 File Agent detected, including any member name. This variable supports PDSE long member names. For example, when you specify this variable, Sterling Connect:Direct 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 Amazon S3 support.

%FA_FSTYPE The file or object file system type. Windows, Unix, OS390, AWSS3
Current date and time %FA_DATE. The current date for the detected file. This value has 8 characters that represent the year, month, and day, for example, 20040903.
%FA_DATE_DAY. The current day, for example, 31.
%FA_DATE_MONTH. The current month, for example, 01.
%FA_DATE_YEAR. The current year, for example, 2004.
%FA_NUM. The millisecond timestamp. If multiple files are sent within the same second, they will 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 (format (hhmmss) using a 24-hour clock.
%FA_TIME_HOUR. The current hour, for example, 13.
%FA_TIME_MINUTES. The current minute, for example, 24.
%FA_TIME_SECONDS. The current second, for example, 35.
Modification date and time %FA_FDATE. The date a detected file was last modified. This value has 8-characters representing year, month, and day, for example, 20040903.
%FA_FDATE_DAY. The day a file was last modified, for example, 21.
%FA_FDATE_MONTH. The month in which a file was last modified, for example, 09.
%FA_FDATE_YEAR. The year in which a file was last modified, for example, 2004.
%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_FTIME_SECONDS. The second a file was last modified, for example, 35.
%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.
UNIX and Microsoft Windows
File name and path %FA_EXT_FOUND. On Microsoft Windows and UNIX, the file extension of the file that was added, for example, .txt.
%FA_EXT_FOUND_NP. On Microsoft Windows and UNIX, the file extension of the file that was added, but without the period before the file extension. For example, if the file added is file.txt, using the %FA_EXT_FOUND_NP variable will result in txt being passed (the extension with no period included).
%FA_NAME_FOUND. On Microsoft Windows and UNIX, the name of the file that was added, for example, myfile.
%FA_NOT_PATH. On Microsoft Windows and UNIX, 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 resolved as test file.active.txt.
%FA_PATH_FOUND. On Microsoft Windows and UNIX, 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. On Microsoft Windows, the default value is the drive where the added file is located, for example, C:.
z/OS systems
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, the following member name is valid: PAYROLLPDSELONGNAME.
S3 Object stores only
  %FA_SCHEME This is the object scheme when 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 value is the object name before substitution occurred, the object name Connect:Direct File Agent detected.