9.10.1 File input connector definition

You specify a file input connector definition (FileInputConnectorDefinition tag) as a child element of a CB definition for input (InputCBDefinition tag).

For details about file input processing, see 10.2 File input.

Organization of this subsection
(1) Format
(2) Details of definition
(3) Example
(4) Specifying sequence numbers for input files

(1) Format

<FileInputConnectorDefinition>
 <input readType="{BATCH|REAL_TIME}"
  compositionType="{WRAP_AROUND|ANTI_WRAP_AROUND}"
  interval="monitoring-interval"
  retryCount="monitoring-retries-count"
  readOrder="{DEFINED|MODIFIED}"
  readUnit="reading-unit"/>
 <file path="input-path-name"
  name="input-files"
  messageLog="{ON|OFF}"/>
</FileInputConnectorDefinition>

(2) Details of definition

FileInputConnectorDefinition tag (all definition information)
Defines all file input connector definition information. You specify this definition only once.
input tag (input definition)
Defines information about the input file read processing and monitoring processing. You specify this definition only once.
readType="{BATCH|REAL_TIME}"
Specifies how to read input files. If this attribute is omitted, REAL_TIME is assumed.
The permitted values are as follows:
  • BATCH
    Reads input files in the batch processing mode.
  • REAL_TIME
    Reads input files in the real-time processing mode.
compositionType="{WRAP_AROUND|ANTI_WRAP_AROUND}"
Specifies the structure of input files. If this attribute is omitted, ANTI_WRAP_AROUND is assumed.
The permitted values are as follows:
  • WRAP_AROUND
    Reads input files in the wraparound mode.
    Note that if you specify BATCH in the readType attribute, WRAP_AROUND cannot be specified. Similarly, if you specify REAL_TIME in the readType attribute and DEFINED in the readOrder attribute, WRAP_AROUND cannot be specified.
  • ANTI_WRAP_AROUND
    Reads input files in the non-wraparound mode.
    Note that if you specify MODIFIED in the readOrder attribute, ANTI_WRAP_AROUND cannot be specified.
interval="monitoring-interval"
If you specified REAL_TIME in the readType attribute, this attribute specifies as an integer from 0 to 1000000 the interval (in milliseconds) at which monitoring of the input file storage directory is to be performed in order to determine whether or not a new file to be input has been created. If you specify 0, monitoring is performed continuously. If this attribute is omitted, 1000 is assumed.
retryCount="monitoring-retries-count"
Specifies as an integer from 0 to 1000 a retries count for monitoring the input file storage directory. If this attribute is omitted, 100 is assumed.
When the number of retries reaches the value of this attribute, the KFSP46203-E warning message is output indicating that there is no file in the input file storage directory waiting to be input and then monitoring is resumed.
A monitoring retry for each file to be input is performed at that point. When a target file is read, the retries count is reset to 0. Therefore, the retries count threshold is checked for each input file and a warning message is output for each input file.
readOrder="{DEFINED|MODIFIED}"
Specifies the order in which input files are to be read. If this attribute is omitted, DEFINED is assumed.
  • DEFINED
    Reads input files in the order their names are specified in the name attribute of the file tag.
  • MODIFIED
    Reads input files in the order of the input file update times.
readUnit="reading-unit"
Specifies as an integer from 1 to 10000 the number of records that are be read by the file input connector at one time. If this attribute is omitted, 1 is assumed.
file tag (input file definition)
Defines information about the input files. You specify this definition only once.
path="input-path-name"
Specifies the path name of the input file storage directory, as 1 to 160 single-byte characters. This attribute cannot be omitted.
The following characters are permitted for this attribute:
Single-byte alphanumeric characters, !, #, $, %, &, ', (, ), =, ~, `, {, }, +, -, ^, ., _, @, \, /, :, single-byte space
name="input-files"
Specifies the files to be input, either as file names or as sequence numbers. This attribute cannot be omitted.
  • Specifying file names
    Specify each file name as a path relative to the input file storage directory specified in the path attribute. You specify multiple file names by delimiting the names with the comma (,). Note that no subdirectory can be specified. Express each input file name as 1 to 60 single-byte characters.
    A specified file name cannot be a reserved device name (such as NUL). If a reserved device name is specified, operation is not guaranteed.
  • Specifying sequence numbers
    Specify the sequence numbers of files that are stored in the input file storage directory specified in the path attribute. For details about the specification method, see (4) Specifying sequence numbers for input files.
Express an input file name as 1 to 1,024 single-byte characters, excluding \, /, and :.
The following characters are permitted for this attribute:
Single-byte alphanumeric characters, !, #, $, %, &, ', (, ), =, ~, `, {, }, +, -, ^, ., _, @, single-byte space
messageLog="{ON|OFF}"
Specifies whether or not the start time and input file name are to be output to the message log when input read processing begins for a file. If this attribute is omitted, OFF is assumed.
The permitted values are as follows:
  • ON
    Outputs the start time and input file name to the message log.
  • OFF
    Does not output the start time and input file name to the message log.

(3) Example

<?xml version="1.0" encoding="UTF-8"?>
<root:AdaptorCompositionDefinition
xmlns:ficon="http://www.hitachi.co.jp/soft/xml/sdp/adaptor/definition/callback/FileInputConnectorDefinition">
<!-- Omitted -->

<!-- CB definition for input -->
<cb:InputCBDefinition
class="jp.co.Hitachi.soft.sdp.adaptor.callback.io.FileInputCBImpl" name="inputer1">
 <!-- File input connector definition -->
 <ficon:FileInputConnectorDefinition>
   <!-- Input definition -->
   <ficon:input readType="REAL_TIME" interval="600000"
    retryCount="100" readUnit="1"/>
   <!-- Input file definition -->
   <ficon:file path="C:\tmp\" name="a[1-100].txt"/>
 </ficon:FileInputConnectorDefinition>
</cb:InputCBDefinition>

(4) Specifying sequence numbers for input files

This subsection describes the format used to specify sequence numbers in place of input file names in the name attribute in the file tag.