IBM Integration Bus, Version 10.0.0.2 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS


Configuring the FileRead node

When you add the FileRead node to a message flow, you can configure it.

About this task

When you put an instance of the FileRead node into a message flow, you can configure it; see Configuring a message flow node. The properties of the node are displayed in the Properties view. All mandatory properties for which you must enter a value (the properties that do not have a default value defined) are marked with an asterisk.

Procedure

  1. Optional: On the Description tab, enter a Short description, a Long description, or both. You can also rename the node on this tab.
  2. On the Basic tab, enter the directories and files to be processed by the FileRead node, together with what to do with any duplicate files encountered.
    1. In Input directory, specify the directory from which the FileRead node obtains files. Specify the directory as either an absolute or a relative directory path. If the directory path is relative, it is based on the directory that is specified in the environment variable MQSI_FILENODES_ROOT_DIRECTORY. An example on Windows systems is C:\fileinput. An example on UNIX systems is /var/fileinput.

      On Windows, if you are specifying a shared directory that is mapped to your local computer, specify the share name instead of the letter that represents the drive; for example \\myshare\mydirectory.

      The FileRead node creates an mqsitransitin subdirectory in the specified input directory to hold and lock input files while they are being processed. If an integration server that processes files in this input directory is removed, check the mqsitransitin subdirectory for partially processed or unprocessed files. Move any such files back into the input directory (and remove the integration server UUID prefix from the file names) so that they can be processed by a different integration server. For more information about the mqsitransitin subdirectory, see How multiple file nodes share access to files in the same directory.

    2. In File name or pattern, specify a pattern for the file name. It is either a file name or a character sequence (a pattern) that matches a file name. A pattern is a sequence that contains at least one of the following wildcard characters:
      Wildcard character Description Example
      * Any sequence of zero or more characters *.xml matches all file names with an xml extension
      ? Any single character f??????.csv matches all file names that consist of the letter f followed by 6 characters and then the sequence .csv.
    3. Select Action to specify the action that the FileRead node takes after successfully processing the file. The action can be to move the file to the archive subdirectory, to augment the file name with a time stamp and move the source file to the archive subdirectory, or to delete the file.
      • If you select Archive, the source file is moved to the archive subdirectory of the input directory. The subdirectory name is mqsiarchive. For example, if the input directory is /var/fileinput, the absolute path of the archive subdirectory is /var/fileinput/mqsiarchive. If this directory does not exist, the integration node creates it when it first tries to move a file there.
      • If you select Archive with timestamp, the current date and time are added to the file name, and the file is then moved to mqsiarchive.
      • If you select Delete, the file is deleted after successful processing.
    4. If user tracing is in operation, the FileRead node writes a message to the user trace whenever it processes a file.
    5. Select Replace duplicate archive files if you want to replace a file in the archive subdirectory with a successfully processed file of the same name. If you do not set this option, and a file with the same name exists in the archive subdirectory, the node throws an exception when it tries to move the successfully processed file.
  3. On the Request tab, specify the location of the data to be read. You can specify the properties on this tab as XPath or ESQL expressions. Content Assist is available in the Properties view and also in the XPath Expression Builder, which you can run by clicking Edit to the right of each property.
    1. In Request directory property location, specify the location of the name of the input directory. If you do not specify a location, the default value is $LocalEnvironment/Destination/File/Directory.
    2. In Request file name property location, specify the location of the name of the input file pattern. If you do not specify a location, the default value is $LocalEnvironment/Destination/File/Name.
    3. In Offset property location, specify the location of the offset from which to start searching for records. If you do not specify a location, the default value is $LocalEnvironment/Destination/File/Offset.
    4. In Length property location, specify the location of the length of the record to be read if you use fixed-length record detection. If you do not specify a location, the default value is $LocalEnvironment/Destination/File/Length.
  4. On the Result tab, set values for the properties that determine where the result is stored.
    1. Use the Result data location property to specify the location in the message to copy to the Output data location field in the outgoing message. The default value is $ResultRoot. For more information, see Combining a result message with an incoming message.
    2. Use the Output data location property to specify the start location in the output message tree where the parsed elements from the bit string of the message are stored. The default value is $OutputRoot.
    3. Use the Copy local environment property to specify whether the local environment is copied to the output message.
      • If Copy local environment is selected, a new copy of the local environment is created in the tree, and it is populated with the contents of the local environment from the preceding node. Therefore, if a node changes the local environment, the upstream nodes are not affected by those changes because they have their own copies. This value is the default.
      • If Copy local environment is not selected, the node does not generate its own copy of the local environment, but uses the local environment that is passed to it by the preceding node. Therefore, if a node changes the local environment, the changes are reflected by the upstream nodes.
    4. Use the Record selection expression property to specify which record in the file to propagate when the Record detection property on the Records and Elements tab is not set to Whole File. The file is read one record at a time until a record is found that matches the expression.
  5. On the Input Message Parsing tab, set values for the properties that the node uses to determine how to parse the incoming message.
    1. In Message domain, select the name of the parser that you are using from the supplied list. The default is BLOB. You can choose from the following options:
      • DFDL
      • XMLNSC
      • DataObject
      • JSON
      • BLOB
      • MIME
      • MRM
      • JMSMap
      • JMSStream
      • XMLNS
      You can also specify a user-defined parser, if appropriate.
    2. If you are using the DFDL parser, the MRM parser or the XMLNSC parser in validating mode, specify the relevant Message model. For XMLNSC, if your schema files are in an application or static library, leave this property blank. If your messages are modeled in a referenced shared library or message set, select the top-level shared library for the shared library or message set that contains the schema files.
    3. If you are using the DFDL or MRM parsers, select the correct message from the list in Message. This list is populated with messages that are defined in the Message model that you selected.
    4. If you are using the MRM parser, select the format of the message from the list in Physical format. This list includes all the physical formats that you defined for this Message model.
    5. Specify the message coded character set ID in Message coded character set ID.
    6. Select the message encoding from the list in Message encoding or specify a numeric encoding value. For more information about encoding, see Data conversion.
  6. On the Parser Options subtab, set the following properties.
    1. Parse timing is, by default, set to On Demand, which causes parsing of the message to be delayed. To cause the entire message to be parsed immediately, set this property to Immediate or Complete. See Parsing on demand for more details.
    2. If you are using the XMLNSC parser, set values for the properties that determine how the XMLNSC parser operates. For more information, see Manipulating messages in the XMLNSC domain.
  7. Use the Records and Elements tab to specify how each file is interpreted as records.
    1. Use the Record detection property to determine how the file is split into records, each of which generates a single message. Choose from the following options:
      • Whole File specifies that the whole file is a single record. A limit of 100 MB applies to the size of the files.
      • Fixed Length specifies that each record is a fixed number of bytes in length. Each record contains the number of bytes specified in the Length property, except possibly a shorter final record in the file. The value that is specified in Length must be in the range 1 byte through 100 MB. The default is 80 bytes.
      • Select Delimited if the records that you are processing are separated, or terminated, by a DOS or UNIX line end or by a sequence of user-defined delimiter bytes. Specify the delimiter and delimiter type in the Delimiter and Delimiter type properties. A limit of 100 MB applies to the length of the records.
      • Select Parsed Record Sequence if the file contains a sequence of one or more records that are serially recognized by the parser that is specified in Message domain. The node propagates each recognized record as a separate message. If you select the Record detection option, the parser that is specified in Message domain must be DFDL, XMLNSC, or MRM.
    2. If you specify Parsed Record Sequence in Record detection, the FileRead node does not determine or limit the length of a record. Nodes that are downstream in the message flow might try to determine the record length or process a long record. If you intend to process large records in this way, ensure that your integration node has sufficient memory. You can apply flow techniques that are described in the Large Messaging sample to make best use of the available memory.
    3. If you specified Delimited in Record detection, use Delimiter to specify the delimiter to be used. Choose from the following values.
      • DOS or UNIX Line End, on UNIX systems, specifies the line feed character (<LF>, X'0A'), and, on Windows systems, specifies a carriage return character followed by a line feed character (<CR><LF>, X'0D0A'). The node treats both of these strings as delimiters, irrespective of the system on which the integration node is running. If they are both in the same file, the node recognizes both as delimiters. The node does not recognize X'15' which, on z/OS® systems, is the 'newline' byte; if your input file is coded with EBCDIC new lines, set this property to Custom Delimiter and set Custom Delimiter to 15.
      • If you select Custom Delimiter, you can specify a sequence of bytes in Custom delimiter
    4. In Custom delimiter, specify the delimiter byte or bytes to be used when Custom delimiter is set in the Delimiter property. Specify this value as an even-numbered string of hexadecimal digits. The default is X'0A' and the maximum length of the string is 16 bytes (represented by 32 hexadecimal digits).
    5. If you specified Delimited in Record detection, use Delimiter type to specify the type of delimiter. Permitted values are:
      • Infix. If you select this value, each delimiter separates a record. If the file ends with a delimiter, the zero length file content that follows the final delimiter is still propagated as a message although it contains no data.
      • Postfix. If you specify this value, each delimiter terminates a record. If the file ends with a delimiter, no empty record is propagated after the delimiter. If the file does not end with a delimiter, the file is processed as if a delimiter follows the final bytes of the file. Postfix is the default value.
    6. The FileRead node considers each occurrence of the delimiter in the input file as either separating (Infix) or terminating (Postfix) each record. If the file begins with a delimiter, the node treats the (zero length) file content that precedes that delimiter as a record and propagates an empty record to the flow. The delimiter is never included in the propagated message.
  8. Use the Validation tab to provide validation that is based on the message set for predefined messages. For more information about validation, see Validating messages. For information about how to complete this tab, see Validation tab properties.

bc34092_.htm | Last updated 2015-09-24 12:53:56