FileSubscriber can be configured to create non-text files by using the isBinary=true parameter in the FileType section and two field parameter tags in the
FILE_LINE element. As a result, FileSubscriber can process non-text data types. The numeric data types are converted from incoming TIBCO data types of either
INTEGER,
UNSIGNED INTEGER,
SHORT,
UNSIGNED SHORT,
FLOAT, or
STRING into the desired target data type that is specified in the convertTo parameter. Because there can be a loss of precision when converting from
FLOAT values, it might be preferable to specify
STRING as the published data type. The numeric data type to be used for the output record for each field is specified by the tag
convertTo in a field parameter of the
FILE_LINE element.
To add a header record, use the fileHeader parameter in the
FILE_OPTIONS element of the FileSubscriber configuration file. To add a trailer record, use the
fileTrailer parameter in the
FILE_OPTIONS element of the FileSubscriber configuration file. For each of these parameters, a text string and up to three variables — the number of records, a blank field, and the date and time — can be specified in the following format:
<text> is any alphanumeric descriptive string. If included, it can appear anywhere within the quotation marks but must not be included within the square brackets ([ ]).
%<fieldWidth> is the number of characters in the related field;
% is a C type substitution
NUMBER_OF_RECORDS is replaced with the number of records in the output file. If there are no errors, this number have to correspond to the number of messages received to generate the file.
DATE_TIME is the date and time in the format YYYYMMDDHHMMSS.
BLANK is a blank field that can be used to provide a space between the other variables.