Connect:Direct File Agent Overview

Connect:Direct® File Agent is a component of IBM® Connect:Direct that provides unattended file management. Before using Connect:Direct for UNIX, you must plan how to configure it to automate file management for your site. After planning what you need to accomplish, configure Connect:Direct File Agent to connect to a IBM Connect:Direct server, watch the directories that files of interest will be added to, and submit a specified IBM Connect:Direct Process to the server when a file is detected.

Connect:Direct File Agent provides monitoring and detection capabilities that enhance the automation you accomplish with IBM Connect:Direct Processes. You cannot create Processes with Connect:Direct File Agent; however, Connect:Direct File Agent variables can be used to pass arguments to a Process. Connect:Direct File Agent does not delete, copy, or move files directly, but it helps you accomplish such tasks by submitting the Process you specify in the configuration to the IBM Connect:Direct server. Before you specify a IBM Connect:Direct Process in the Connect:Direct File Agent configuration, you must create and test the Processes to ensure that it performs tasks as expected when Connect:Direct File Agent submits the Process.

Using the Connect:Direct File Agent configuration interface and Help system, you define the default configuration file (Default_Config.ser). The default configuration file defines the IBM Connect:Direct server that Connect:Direct for UNIX communicates with; the directory, or directories, that Connect:Direct File Agent monitors; and how a file added to a watched directory or a detected system event are processed.

You can configure Connect:Direct File Agent to operate in either of the following ways:

  • Watch for any file to appear in one or more watched directories and submit the default Process after detecting the newly added file.
  • Override the default Process specified and apply either watched file event rules (Submit Process rule) or system event rules that is enabled for the configuration. Connect:Direct File Agent applies a watched file event rule to a detected file by checking file properties to determine whether criteria specified by the rule are met. A system event rule checks whether a system event meets criteria specified by the rule. When all criteria for a rule are met, Connect:Direct File Agent submits the IBM Connect:Direct Process associated with that rule.

You can create Connect:Direct File Agent rules based on the following properties:

  • Full or partial name of the file detected in a watched directory
  • Size of the file detected in a watched directory
  • System event title
  • System event contents (as included in a stack trace)

You can specify more than one rule in a Connect:Direct File Agent configuration; each rule can have Connect:Direct File Agent submit a different Process.

Although you can create multiple rules as part of a Connect:Direct File Agent configuration, Connect:Direct File Agent processing ends when all criteria for a rule are met. Therefore, you should specify rules so that those with more specific criteria (properties) are listed first in the configuration.

For optimum performance, you should configure Connect:Direct File Agent to communicate with the IBM Connect:Direct node where it is installed. You can configure Connect:Direct File Agent to use continuous signon and remain connected to the API port for the IBM Connect:Direct server at all times, or configure it to connect to the port only when it needs to. Connect:Direct File Agent can be installed on UNIX, Microsoft Windows, and z/OS operating systems. When you use IBM Connect:Direct with UNIX or Microsoft Windows, the watched directory is a UNIX pathname or a Microsoft Windows path to the directory. When you use IBM Connect:Direct with z/OS, the watched directory can be the HFS pathname for a file or a directory, the full MVS data set name, or a partial MVS data set name.

Connect:Direct File Agent can monitor multiple directories, including local and network directories. Connect:Direct File Agent scans the watched directories you specify in the configuration for newly added files (unless you specify a rule to force other operation). By default, Connect:Direct File Agent scans a watched directory once per minute. For example, if you start Connect:Direct File Agent at 1:00 p.m., a file added to that watched directory at 12:55 a.m. is not detected as newly added. If you start Connect:Direct File Agent at 1:00 p.m., and a file is placed in the watched directory at 1:01 p.m., then Connect:Direct File Agent detects this newly added file. Connect:Direct File Agent detects a file only one time, unless the file is accessed and saved with a later timestamp.

Using Connect:Direct File Agent requires an understanding of IBM Connect:Direct Processes, operating systems, and scripting (for regular expression operator use with Connect:Direct File Agent rules).