Monitor definitions
Monitor definitions are used to specify what output queue or directory will be monitored for input files to be processed. If defining more than one monitor job, specify a unique job name for each monitor.
- Spooled file name
- Form type
- User data
- Job name
- User-defined options 1 through 4
- User-defined data
When using a directory monitor, Content Manager OnDemand will only process IFS files with specific file extensions. For a regular directory monitor, files ending in .IND or .PDF must exist in the directory to trigger the archive process. For a 'type 2' directory monitor, files ending in .ARD must exist in the directory to trigger the process. For a 'type 3' directory monitor, files ending in .AFP, .LIN, .LINE, .TXT, or .PDF must exist in the directory to trigger the process. When the monitor job selects a file from the selected directory for archiving, it needs to determine which application group and application to associate with the file so that it can be archived correctly. Since the only data available to the monitor is the filename of the selected file, the application group name and application name must be derived from the filename. Content Manager OnDemand will examine the contents of the first, second, third, or fourth part of the filename, in the order specified in the Check first, Check next, Check last selections. For example, a file named INVOICES.NOVEMBER.pdf might be defined by specifying FIRST from the Check first pull down list for the application group name to cause Content Manager OnDemand to use the 'INVOICES' application group definition to archive the file.
The attribute selected from the Check first pull down list is examined first. If the value of this attribute does not match the name of an existing application group, Content Manager OnDemand examines the attribute selected from the Check next pull down list, if specified. If the value of this attribute does not match an application group name, the attribute selected from the Check last pull down list, if specified, is checked.
For output queue monitors, if a valid application group is not determined using the preceding method, the spooled file is moved to another output queue designated as an 'error' queue which is defined in this monitor definition. If the spooled file is successfully archived, it can be moved to a 'processed' queue or deleted according to the specifications in the monitor definition. The same process is followed to find a valid application name, unless you specify that the application name is the same as the application group name.
For directory monitors, if a valid application group is not determined using the preceding method, the file remains in the directory and is renamed by appending '.ERR' to the filename. If the file is successfully archived, it can be renamed by appending '.PRC' to the filename or deleted according to the specifications in the monitor definition. The same process is followed to find a valid application name, unless you specify that the application name is the same as the application group name.
You can create a user exit program to alter the application group name or application name that the output queue or directory monitor finds as it processes files in a monitored output queue or IFS directory. For more information, see Output queue or directory monitor user exit program.
A monitor can be started manually, by a job scheduler, or started when the subsystem starts. A monitor can be ended manually, at a specific time of day, after a specified time period, after all queue entries are processed, after a specified number of errors, or it can be specified when the monitor is started.
For output queue monitors, the first time you start a monitor for a particular output queue, it is best to do it when there are no spooled files in the output queue. When a monitor is started for the first time, an empty data queue with the same name as the output queue is created, which will receive entries for all spooled files that appear in the output queue in Ready status. Once the output queue monitor has been started (and therefore the data queue has been created), you can then begin moving the spooled files that you want to capture into the output queue. The data queue entries that get created will trigger the monitor to process each spooled file.