Copyright © TIBCO Software Inc. All rights reserved
Copyright © TIBCO Software Inc. All rights reserved


Chapter 3 Configuring the Adapter : FilePublisher Configuration

FilePublisher Configuration
This section describes the FilePublisher configuration file. The sections are listed in the order in which the sections appear in the file; the elements that comprise each section are listed in alphabetical order. In addition, sample elements are provided at the end of the section.
Trace Section
You can use the Trace section to control the trace logging behavior of FilePublisher. This is the first section in the configuration file. The elements specified in this section are listed in the following table; all are required (except those used at the request of TIBCO Support).
Specifies how many log files to keep. Each saved old log file name has a number (from 1 to the FILE_COUNT minus 1) suffixed to it. For example, if FILE_NAME is specified as FPLOG, and FILE_COUNT is set to 5, four log files are saved, named FPLOG1 through FPLOG4, with FPLOG4 being the earliest (or oldest) file.
Identifies the log file to be used for trace messages. This is a source physical file. If the file does not exist, then FilePublisher creates one. The default record length is 266 bytes. Default trace log files, PUBLOG and SUBLOG, are available in TIBFASMPRV and TIBFASMPEM depending on which product options were installed. If you require a larger record length, you can create your own file; for example:
Specifies whether to send the trace log messages to standard output (STDOUT) when set to true. This setting is in addition to the trace log file specified with FILE_NAME. If the adapter jobs are submitted to batch, STDOUT appears in the QPRINT printer file. If QSHELL is used to submit the adapter jobs, STDOUT appears on screen.
Trace level 1 generates the following session-level messages:
Trace level 2 generates level 1 messages plus all the values loaded from the config file as below:
Trace level 3 generates level 1 and 2 messages plus the following field-related messages:
Trace level 4 for detailed tracing. Usually used only at the request of TIBCO Support.
Trace level 5 for detailed tracing. Usually used only at the request of TIBCO Support.
Traces all TIBCO RV and EMS and EMS received message callbacks
Trace Level 6 generates level 1 through 5 messages. Usually used only at the request of TIBCO Support.
Trace Level 10 generates Level 1 through 6 messages. Usually used only at the request of TIBCO Support.
Detailed trace of all TIBCO RV and EMS and EMS message allocates and frees
Trace Level 15 generates Level 1 through 10 messages. Usually used only at the request of TIBCO Support.
Options Section
You can configure the following options in the Options section:
Establish the type of TIBCO EMS/Rendezvous or TIBCO EMS session to be used by FilePublisher for publishing
.
Used to set the terminate subject or destination (for EMS) to _FILEADAPTER.<adapter name>.TERMINATE. Sending a message to this subject can stop FilePublisher.
Used to set the heartbeat subject or destination (for EMS) to _FILEADAPTER.<adapter name>.HEARTBEAT. This is used by FilePublisher to send heartbeat messages, but does not mean that heartbeats are always published. To publish (send) heartbeats, see PUBLISH_HEARTBEAT. For terminate messages, the default destination type is QUEUE. For heartbeat messages, the default destination type is TOPIC.
Specifies whether to abend the adapter when it encounters an initialization error for any FileType section. If set to true, and if a configuration error is found for a file, the publisher generates a message to the log and goes on to the next file. If set to false, abend the adapter.
Valid values: true, false. The default value is false.
none—do not remove the progress file.
single—remove the progress file when it is a 1:1 relationship between the publisher and subscriber.
multiple—remove the progress file.
The valid values are true, false. The default value is false.
Valid values: 4, 8. The default value is 8.
Specifies where the error messages publish to. If this parameter is not blank, all traceErr and FatalErr messages are copied and sent to that subject.
Note: Specify this field at the end of the Options section. Since the Rendezvous transport or EMS connection is not created until the end of the Options section, any error that occurs can't be published.
If set to true, additional file type information is also published in the heartbeat message. For example, file prefix, file extension, and number of messages published are included.
Valid values: true, false. The default value is true.
The default value is 60000 milliseconds, or 60 seconds.
Specifies the translation table to use on the IBM i mainframe side. Defaults to the CCSID of the job in which the Publisher or Subscriber is running and which is usually tied to the profile of the user who initiated the job.
Default library data set to search for publishing files.
If set to true, enables a publisher to shut down when the Rendezvous daemon shuts down.
If not specified, defaults to false, which means that the publisher continues to run even if the Rendezvous daemon shuts down.
Note: This functionality is provided by default in TIBCO EMS. Whenever an exception occurs in a client connection to an EMS server, it is handled by default.
A setting to true for this element enables publishing of heartbeat messages. If not specified it defaults to false, meaning heartbeat messages are not published.
name — A unique alphanumeric name identifying the TIBCO Rendezvous session
service — The service group for this session
network — Network to initialize a TIBCO Rendezvous session
daemon — The name of the TIBCO Rendezvous daemon for this session
ledgerFile — The name of the file-based ledger for Certified Messaging. This file is created in the Integrated File System.
requireOldMessages — Indicates whether a persistent correspondent requires delivery of messages sent to a previous session with the same name for which delivery was not confirmed. A setting to true enables delivery of old unacknowledged messages; a setting to false does not.
defaultTimeLimit — Sets the default message time limit for all outbound certified messages. The time is specified in seconds and the default value is 60.
syncLedger — If you want to use a synchronous ledger file, set this parameter to true. The default value for this is false, meaning an asynchronous ledger file is used.
providerURL — The URL of the TIBCO EMS server
Specifies that the adapter abends if it cannot successfully call the tibrvsend API. This flag is only applicable to record mode processing. If the file is in block mode, the flag is ignored and the adapter is abended. Upon recovery, the adapter re-syncs to the last check point. In the case of standard block mode, the entire file is retransmitted. In ECM, retransmission begins with the last block that was successfully acknowledged. Valid values: true, false. The default value is false.
If true, major checkpoint log messages are sent to QSYSOPR *MSGQ. Each message includes date and time information. Valid values: true, false. The default value is false.
The EOL_CHARACTER is specified as a two-character literal that represents the EBCDIC hexadecimal value.
Pre-Register Section
You can use the Pre-Register section to configure and specify the list of anticipated subscribers for the subjects that are published. When the anticipated subscribers are pre-registered, the delivery of Certified Messages is guaranteed regardless of when the subscriber is started, before or after FilePublisher, or when FileSubscriber goes down and is restarted. To use this feature, both FilePublisher and FileSubscriber must establish an RVCM_SESSION with the requireOldMessage parameter set to true.
Use of this section in your configuration file is optional. If it appears, you have to define it after the Options section. Use the following element to specify the anticipated subscribers for each subject.
listenerName — Specifies the name of the subscribing session.
listeningSubject — Specifies the name of the subscription subject.
FileType Section
The FileType section contains two elements:
FILE_OPTIONS Element
Use the FILE_OPTIONS element to specify the following options:
The FILE_OPTIONS element is also used to identify those files you want to be published in certified mode if you have started a certified FilePublisher session. A config file can have multiple [FILE OPTIONS] definitions in a single file. See the File PublisherExamples section for details.
The following table lists the parameters in the FILE_OPTIONS elements.
filePrefix (required)
Used to select files from the input library data set for publishing. While polling, any files with a name that starts with this file prefix are selected for publishing. This prefix can be up to 5 characters.
When set to the string NULL, and if trigger mode is used, and the full path of the file is specified, then the publisher cannot be ignore this file type. It generates the temporary file without using the file prefix.
Valid values: TOPIC, QUEUE. The default value is TOPIC.
Valid values: PERSISTENT, NON_PERSISTENT, RELIABLE_DELIVERY.
Valid values: body, null.
Valid values are TIBEMS_AUTO_ACKNOWLEDGE, TIBEMS_CLIENT_ACKNOWLEDGE, TIBEMS_DUPS_OK_ACKNOWLEDGE, TIBEMS_EXPLICIT_CLIENT_ACKNOWLEDGE, TIBEMS_EXPLICIT_CLIENT_DUPS_OK_ACKNOWLEDGE, TIBEMS_NO_ACKNOWLEDGE.
The default value is TIBEMS_AUTO_ACKNOWLEDGE.
Specifies whether a GUID-like transaction id is to be used. If the file is configured as needing one, and if no trackingId string is received as part of the trigger message, then the publisher automatically generates a GUID-like string for the trackingId. If the trackingId string comes with the trigger message, the id is forwarded to the subscriber. This information is sent after the publisher receives the final EOF message from the subscriber.
Valid values: true, false (default). If true, the following fields are attached to the message that is published on the subject specified by trackinIdSubject:
GdgTriggerName (N/A for IBM i, z/OS only for GDG files)
FileExtension (N/A for IBM i, NT only, null if z/OS)
Name of the subject to which messages containing the trackingId information are published.
If set to true, FilePublisher polls for file names to publish from INPUT_LIBRARY whose names begin with the filePrefix value. A setting to false disables file polling. The default value is false.
For ECM, this parameter is used for an additional purpose in conjunction with retransmissionDelayTicks. In this case, the publisher checks for any pending confirmations and re-transmit any unacknowledged data messages. See retransmissionDelayTicks. Also used to set up the Admin Timeout timer for resending startup messages to the subscribers.
The durable subscribers in EMS require that endPublishSubject equal publishSubject (or endPublishDestinationName equal publishDestinationName).
Note that publishing an end-of-file indication on a different subject than publishSubject in RV might not maintain the correct sequence of messages.
Most usages of generateFileSubjectName require that it match the subscribeSubjectName.
The adapter uses the generateFileFieldName parameter as a message differentiator. A message arriving on a subject name can be checked to see whether it is a regular “Data” message, or whether it is a “Generate File” trigger.
When an incoming message has a field matching the value specified in the generateFileFieldName parameter, then the message is assumed to be a “Generate File” trigger message, and the subscriber generates the final target output file.
Use ECM mode. Valid values: true, false (default). If true, block mode is used automatically.
For the Publisher, this parameter represents the number of times the transactionDelay timer must pop before checking for any unacknowledged Message Blocks. The default value for the Publisher is (retransmissionDelayTicks*transactionDelay) sec.
Also, this represents the number of times the transactionDelaytimer pops before the Publisher attempts to re-synchronize with the Subscriber.
Specifies how a publisher proceeds upon receiving all the acknowledgements from all the ECM subscribers. If set to true, the next transaction is processed immediately after FilePublisher receives all the confirmations. If set to false, it uses the normal transactionDelay parameter to process transactions.
Valid values: true (default), false. Set to true for ECM publishers to speed up delivery.
Warning: You cannot specify both an ECMSubscriberName and a confirmationSubject.
Warning: You cannot specify both a confirmationSubject and an ECMSubscriberName.
Name of the input library. The default value is the INPUT_LIBRARY specified in the Options section. This overrides the value specified in INPUT_LIBRARY.
Name of the process library for this file type. The default value is the PROCESS_LIBRARY specified in the Options section. This overrides the value specified in PROCESS_LIBRARY.
Name of the output library for this file type. The default value is the OUTPUT_LIBRARY specified in the Options section. This is used in conjunction with polling. This overrides the value specified in OUTPUT_LIBRARY.
Record length of the file being published. If lineLength is not specified, the adapter uses the catalog service to obtain the file attributes.
If the FilePublisher session is not a certified session, this parameter is ignored. If the FilePublisher session is specified as a certified session, the default value for this parameter is true, meaning the file is published in certified mode. If you want to have a specific file published in non-certified (Reliable) mode, you can specify false.
Applies to STRING fields. Set this parameter to true to have FilePublisher strip leading blanks from a STRING.
Applies to STRING fields. Set this parameter to true to have FilePublisher strip trailing blanks.
Identifies the record structure to FilePublisher. If this value is true, the fields in the records are assumed to be fixed length.
Identifies the record as having variable-length fields. The delimiter can be any unique character. If useFieldWidth is set to false, the default for this field is | (vertical bar).
When set to true, specifies that the file data is in binary format. Binary data includes zoned decimal, binary, packed decimal, and floating point data types.
If the values are set to true, these parameters specify that a log file have to be created to contain a copy of all the input records which were either matched or unmatched respectively according to the constraint definitions for multi-record-format data.
MESSAGE_FIELDS Element
Use the MESSAGE_FIELDS element of the FileType section to configure any messages that are to be published.
To publish from a file with multi-record format (a file with header and detail records), define one MESSAGE_FIELDS element for each record type using the constraint parameter.
The MESSAGE_FIELDS element describes the format of the message to be published. It can be formed by using one or more of the following parameters.
Tags in the messageItem Parameter
The messageItem parameter can identify a field with a constant value, a field from a fixed-width input record, or a field from a delimited input record. In any case, it uses the following tags:
Valid values: STRING, INTEGER, UNSIGNED INTEGER, SHORT, UNSIGNED SHORT, FLOAT, DOUBLE, BOOLEAN, and TIME. The default value is STRING.
Valid values for EMS: STRING, INTEGER, SHORT, FLOAT, DOUBLE, BOOLEAN.
Note: When you specify TIME as the data type, FilePublisher gets the current system time and adds it to the TIBCO message. When FileSubscriber receives the message, it converts the time to a string that represents the time of the publishing system.
Specify OPAQUE to send a field untranslated. See Sending Data Untranslated (OPAQUE).
For COBOL numeric datatypes only, specify one of ZONED, BINARY, PACKED, COMP, COMP-1, COMP-2, COMP-3, or COMP-4 for numeric data. See Sending Numeric Data Types.
Note: Make sure isBinary is set to true for both OPAQUE and COBOL numeric data.
The default value is false, meaning the input numeric field is published as a FLOAT or INTEGER value depending on the type of the field. The datatypes COMP-1, COMP-2, and COMP-3 are published as FLOAT and COMP, COMP-4 as INTEGERs.
For a more accurate conversion, specify true, meaning a STRING data type is published.
You can use this tag to emulate the COBOL equivalent of LOW-VALUES and HIGH-VALUES. Valid values:
LOW-VALUES -- Sets field’s value to binary zeros.
HIGH-VALUES -- Sets field’s value to binary X’FFFFFFFF’.
For a field with a constant value, add the following tags along with label and type.
Set this tag to true to specify that the field is a constant.
For a field from a fixed-width input record, add the following tags along with label and type to specify the field’s position within the record and the length of the field.
For a field from a delimited input record, add the following tag along with label and type to specify the field’s location within the record.
Tags in the messageContainer Parameter
You can group message items into containers to form a nested message using the messageContainer parameter. Include the following tags along with the messageItem or other messageContainer that you want to group together.
Tags in the constraint Parameter
The adapter supports files with multiple record formats. If there is more than one record format, include the constraint parameter using the following tags:
Specifies that this message field definition has to start a new message. If this tag is set to false, the TIBCO message created by the message field is combined with the previous TIBCO message.
The default value is true for EMS and false for RV. Refer to Example 8, Nesting of Mapped Messages.
Specifies the value of the record identifier field. While publishing, this MESSAGE_FIELD format is used only if this value matches the record identifier field of the input record.
For a fixed width input record, add the following tags to the containerName, startNewMessage, and value tags.
For a delimited input record, add the following tag to the containerName, startNewMessage and value tags:
Sample Configuration Elements
This section contains several configuration file examples that you can use as models for your own custom configuration file.
Example 1 Record Mode Publisher – Delimited Text File
Configuration file name – PUB001, input file – FT11.
A portion of the file shows how the data looks:
115-01-0500|MONITOR|SONY|VIEWSONIC|01|350.50
115-15-6542|CPU-PIII750MHZ|COMPAQ|PRESARIO|01|900.00
115-67-7356|HDD20GB|SEAGATE|ST500|01|276.60
115-34-8767|FDD54|HP|T24333|01|86.00
115-77-5555|CDRW|HP|T75668|01|350.00
115-78-4646|KEYBOARD|COMPAQ|EASYKEY101|01|32.00
115-88-4454|MOUSE|MICROSOFT|M323|01|26.00
115-36-2727|WINDOWS2000|MICROSOFT|MSW2000|01|400.00
The FileType section of the configuration file:
[FileType]
FILE_OPTIONS = { filePrefix="FT1",
                 dataSetType = "SEQ",
                 isBinary = "false",
                 useFieldWidth = "false",
                 delimiter = "|",
                 messagesPerTransaction = "10",
                 transactionDelay = "2000",
                 publishSubjectName = "SUB.PUB001.FT1",
                 useFilePolling = "true", pollInterval="5000",
                 removeAfterProcess = "false",
                 transferType = "RecordMode"
               }
 
MESSAGE_FIELDS = {
messageItem = { location="1", label="PartNo", type="STRING" },
messageItem = { location="2", label="Desc", type="STRING" },
messageItem = { location="3", label="Manufacturer", type="STRING" },
messageItem = { location="4", label="Model", type="STRING" },
messageItem = { location="5", label="Quantity", type="INTEGER" },
messageItem = { location="6", label="Price", type="FLOAT",
precision="7,2" },
messageItem = { location="7", label="Warranty", type="STRING",
constant="true", value="1 Year" }
}
Example 2 Record Mode Publisher – Fixed Length Text File
Configuration file name – PUB002, input file – FT21.
A portion of the file shows how the data looks:
115-01-0500 MONITOR SONY VIEWSONIC 2 250.50
115-15-6542 CPU-PIII750MHZ COMPAQ PRESARIO 04 12.30
115-67-7356 HDD20GB SEAGATE ST500 25 15
115-34-8767 FDD54 HP T24333 1 045.22
115-77-5555 CDRW HP T57213 5 290.00
115-78-4646 KEYBOARD COMPAQ EASYKEY1 10 121.21
The FileType section of the configuration file:
[FileType]
FILE_OPTIONS = { filePrefix="FT2",
                 dataSetType = "SEQ",
                 isBinary = "false",
                 lineLength = "100",
                 startAtLine = "1",
                 useFieldWidth = "true",
                 messagesPerTransaction = "5",
                 transactionDelay = "2000",
                 publishSubjectName = "SUB.PUB002.FT2",
                 triggerSubjectName = "TRIGGER.PUB002.FT2",
                 endPublishSubject = "ENDPUB.PUB002.FT2",
                 startPublishSubject = "STARTPUB.PUB002.FT2",
                 useFilePolling = "false", pollInterval="5000",
                 removeAfterProcess = "false",
                 transferType = "RecordMode"
               }
 
MESSAGE_FIELDS = {
messageItem = { position="0", length = "11", label="PartNo", type="STRING" },
messageItem = { position="11",length = "15", label="Desc", type="STRING" },
messageItem = { position="26",length = "11", label="Vendor", type="STRING" },
messageItem = { position="37",length = "12", label="Model", type="STRING" },
messageItem = { position="49",length = "2", label="Quantity", type="INTEGER" },
messageItem = { position="51",length = "8", label="Price", type="FLOAT" },
messageItem = { position="59", label="Warranty", type="STRING",
constant="true", value="1 Year" }
}
Example 3 Record Mode Publisher – Different Header and Detail Formats
As an example of how to use the constraint parameter, suppose a file contains both header and detail records that must be combined into one output TIBCO Rendezvous message, but the records have different formats. You could create a TIBCO Rendezvous message as follows:
1.
a.
b.
2.
3.
If the record is a header record, specify that TIBCO Rendezvous must start a new message. Do this by specifying the startNewMessage parameter to true. For detail records, specify the startNewMessage parameter to false if they are to be published with the header record as a single message, otherwise specify true, which causes the records to be published as separate messages.
4.
The containerName parameter is used to identify the container. For this example, the values supplied are containerName=”Recfm1_Quote” and containerName=”Recfm2_Items”.
Configuration file name – PUB003, input file – FT31.
A portion of the file shows how the data looks:
QUOTE 15004MC001
ITEMS 115-01-0500 MONITOR SONY VIEWSONIC 2 250.50
ITEMS 115-15-6542 CPU-PIII750MHZ COMPAQ PRESARIO 04 12.30
ITEMS 115-67-7356 HDD20GB SEAGATE ST500 25 15
QUOTE 15004MC002
ITEMS 115-34-8767 FDD54 HP T24333 1 045.22
ITEMS 115-77-5555 CDRW HP T57213 5 290.00
ITEMS 115-78-4646 KEYBOARD COMPAQ EASYKEY1 10 121.21
The FileType section of the configuration file:
[FileType]
FILE_OPTIONS = { filePrefix="FT3",
                 dataSetType = "SEQ",
                 isBinary = "false",
                 lineLength = "100",
                 startAtLine = "1",
                 useFieldWidth = "true",
                 messagesPerTransaction = "10",
                 transactionDelay = "2000",
                 publishSubjectName = "SUB.PUB003.FT3",
                 useFilePolling = "true", pollInterval="5000",
                 removeAfterProcess = "false",
                 transferType = "RecordMode"
               }
 
MESSAGE_FIELDS = {
constraint = { position="0", length = "5", value="QUOTE",
containerName="Recfm1_Quote",
startNewMessage="true" },
messageItem = { position="5", length = "5", label="QuoteRequestNo", type="INTEGER" },
messageItem = { position="10", length = "5", label="SupplierCode", type="STRING" }
}
MESSAGE_FIELDS = {
constraint = { position="0", length = "5", value="ITEMS",
containerName="Recfm2_Items",
startNewMessage="false" },
messageItem = { position="5", length = "11", label="PartNo", type="STRING" },
messageItem = { position="16",length = "15", label="Desc", type="STRING" },
messageItem = { position="31",length = "11", label="Vendor", type="STRING" },
messageItem = { position="42",length = "12", label="Model", type="STRING" },
messageItem = { position="54",length = "2", label="Quantity", type="INTEGER" },
messageItem = { position="56",length = "6", label="Price", type="FLOAT", precision="6,2" },
messageItem = { label="Warranty", type="STRING", constant="true", value="1 Year" }
}
Example 4 Record Mode Publisher - Supporting Numeric Data Types
This example shows a FilePublisher configuration file that supports different numeric data types. It also demonstrates the use of “OPAQUE” keyword. For the FilePublisher sample configuration file, three messageItems are specified.
The FILE_OPTIONS element of the FileType section contains the parameter isBinary, specified as true.
The numeric field location is specified using the position tag in the messageItem parameter. This value specifies the byte number, starting at 1, of the starting position of the field within the record.
The precision tag in the messageItem parameter is used to identify the relative length of the field and the number of decimal positions. FilePublisher calculates the length of the field within the record depending on the data type. For example, if the field is identified as BINARY, and the precision is specified as 9,2, then the field occupies 8 bytes of data in the record.
Configuration file name – PUB004, input file – BIN2.
A portion of the file shows how the data looks:
CHAR PACKED       ZONED         BINARY    FLOAT         DOUBLE
abc  1,231,234.12 12,345,678.12 1,234,567 4501.00E-002  123456.7912E+005
def  1,234,567.00 98,989,898.00 1,234,567 15670.10E-001 123456.7000E+001
abc  1,231,234.12 12,345,678.12 1,234,567 14501.00E-002 123456.7912E+005
def  1,234,567.00 98,989,898.00 1,234,567 15670.10E-001 123456.7000E+001
ghi  123.00       999.00        123       12300.00E-002 123123.4567E+002
jkl  123.20       999.11        345,999   34599.90E-001 345999.1121E+004
 
[FileType]
FILE_OPTIONS = { filePrefix="BIN2",
                 dataSetType = "SEQ",
                 isBinary = "true",
                 lineLength = "95",
                 startAtLine = "1",
                 useFieldWidth = "true",
                 messagesPerTransaction = "10",
                 transactionDelay = "2000",
                 publishSubjectName = "SUB.PUB004.BIN2",
                 useFilePolling = "true", pollInterval="5000",
                 removeLeadingBlanks = "true",
                 removeTrailingBlanks = "true",
                 removeAfterProcess = "false",
                 transferType = "RecordMode"
               }
 
MESSAGE_FIELDS = {
messageItem = { fieldStart="01", label="Char", length="5", type="STRING" },
messageItem = { fieldStart="06", label="Packed", precision="10,2", convertToString="false", type="PACKED" },
messageItem = { fieldStart="12", label="Zoned", precision="10,2", convertToString="false", type="ZONED" },
messageItem = { fieldStart="22", label="Binary", precision="10,0", convertToString="false", type="BINARY" },
messageItem = { fieldStart="30", label="Float", precision="7,2", length="7", convertToString="false", type="COMP-1" },
messageItem = { fieldStart="34", label="Double", precision="10,4", length="10", convertToString="false", type="COMP-2" }
}
Example 5 Record Mode Publisher with ECM
This example is for publishing a file using ECM. In Record Mode ECM, you have to specify endPublishSubject to signal the end of file publishing to FileSubscriber. The generateFileSubjectName parameter in FileSubscriber must be the same as endPublishSubject.
Configuration file name – PUB005, input file – FT1.
The FileType section of the configuration file:
[FileType]
FILE_OPTIONS = { filePrefix="FT1",
                 dataSetType = "SEQ",
                 isBinary = "false",
                 lineLength = "100",
                 startAtLine = "1",
                 useFieldWidth = "false",
                 delimiter = "|",
                 messagesPerTransaction = "10",
                 transactionDelay = "5000",
                 publishSubjectName = "SUB.PUB005.FT1",
                 endPublishSubject = "ENDPUB.PUB005.FT1",
                 useFilePolling = "true", pollInterval="5000",
                 removeAfterProcess = "false",
                 confirmationSubject = "ECM.PUB005.FT1",
                 totalConfirmationSubscribers = "1",
                 transferType = "RecordModeECM"
}
MESSAGE_FIELDS = {
messageItem = { location="1", label="PartNo", type="STRING" },
messageItem = { location="2", label="Desc", type="STRING" },
messageItem = { location="3", label="Manufacturer", type="STRING" },
messageItem = { location="4", label="Model", type="STRING" },
messageItem = { location="5", label="Quantity", type="INTEGER" },
messageItem = { location="6", label="Price", type="FLOAT",
precision="7,2" },
messageItem = { location="7", label="Warranty", type="STRING",
constant="true", value="1 Year" }
}
 
Example 6 Block Mode Publisher - Simple File Transfer
You might want to publish a file without regard to its file structure. To do this, specify that the file is to be published, or subscribed to, in Block Mode SFT.
Configuration file name – PUB006, input file – FT2.
The FileType section of the configuration file:
[FileType]
FILE_OPTIONS = { filePrefix="FT2",
                 dataSetType = "SEQ",
                 isBinary = "false",
                 lineLength = "100",
                 startAtLine = "1",
                 messagesPerTransaction = "2",                  transactionDelay="1000",
                 publishSubjectName = "SUB.PUB006.FT2",
                 endPublishSubject = "ENDPUB.PUB006.FT2",
                 useFilePolling = "true", pollInterval="5000",
                 removeAfterProcess = "false",
                 blockTransferSize = "128000",
                 transferType = "BlockModeSFT"
}
 
Example 7 Block Mode Publisher with ECM
You might want to publish a file without regard to its file structure and at the same time use ECM. To do this, specify that the file is to be published, or subscribed to, in Block Mode ECM.
Configuration file name – PUB007, input file – FT2.
The FileType section of the configuration file:
[FileType]
FILE_OPTIONS = { filePrefix="FT2",
                 dataSetType = "SEQ",
                 isBinary = "false",
                 lineLength = "100",
                 startAtLine = "1",
                 messagesPerTransaction = "2",                  transactionDelay="2000",
                 publishSubjectName = "SUB.PUB007.FT2",
                 useFilePolling = "true", pollInterval="5000",
                 removeAfterProcess = "false",
                 blockTransferSize = "128000",
                 ECMSubscriberName = "ECM.PUB007.FT2",
                 transferType = "BlockModeECM"
}
 
Example 8 Nesting of Mapped Messages
When nesting map messages, child messages are nested inside a stream message. This allows the nested map messages to be retrieved in the order in which they were inserted from inside the stream message without extra effort. In addition, at each transaction boundary, each map message identifies itself with an internal name-value pair generated by FilePublisher. This internal name-value pair appears as follows:
aXxXCONSTRAINTXxXa={String:dytsth}
where dytsth is the name defined for the container name in the CONSTRAINT.
Sample MESSAGE_FIELDS definitions:
 
MESSAGE_FIELDS = { CONSTRAINT = {POSITION = "0", length = "1",
                   value = "H", startnewmessage = "true",
                   containername = "dytsth" } ,
   MESSAGEITEM = { position="0", length = "1",
                   label="hdrRec", type="STRING" },
   MESSAGEITEM = { position="1", length = "11",
                   label="hPartNo", type="STRING" },
   MESSAGEITEM = { position="12",length = "15",
                   label="hDesc", type="STRING" },
   MESSAGEITEM = { position="27",length = "11",
                   label="hManufacturer", type="STRING" },
   MESSAGEITEM = { position="38",length = "12",
                   label="hModel", type="STRING" } }
MESSAGE_FIELDS = { CONSTRAINT = {POSITION = "0", length = "1",
                   value = "D", startnewmessage = "false",
                   containername = "dytstd" } ,
   MESSAGEITEM = { position="0", length = "1",
                   label="dtlRec", type="STRING" },
   MESSAGEITEM = { position="1", length = "11",
                   label="PartNo", type="STRING" },
   MESSAGEITEM = { position="12",length = "15",
                   label="Desc", type="STRING" },
   MESSAGEITEM = { position="27",length = "11",
                   label="Manufacturer", type="STRING" },
   MESSAGEITEM = { position="38",length = "12",
                   label="Model", type="STRING" }
   }
 
Sample input data file:
 
Hpartnumber1description1111manufact111modelnum1111
Dpartnumber1description1111manufact111modelnum1111
Hpartnumber2description2222manufact222modelnum2222
Dpartnumber2descriptionXXXXmanufact222modelnum2222
Dpartnumber2description2222manufact222modelnum2222
Hpartnumber3description3333manufact333modelnum3333
Dpartnumber3description3333manufact333modelnum3333
The following four messages would be generated and sent by FilePublisher:
StreamMessage={ Header={ JMSMessageID={ID:EMS-SERVER.7B84B0D3513102:25} JMSDestination={Queue[DY.MRECFM.FILE.BACKUP]} JMSReplyTo={null} JMSDeliveryMode={PERSISTENT} JMSRedelivered={false} JMSCorrelationID={null} JMSType={null} JMSTimestamp={Thu Dec 03 10:03:43 EST 2009} JMSExpiration={0} JMSPriority={4} } Properties={ JMS_TIBCO_MSG_EXT={Boolean:true} } Fields={ {MapMsg:{ hDesc={String:description1111} hModel={String:modelnum1111} aXxXCONSTRAINTXxXa={String:dytsth} hPartNo={String:partnumber1} hManufacturer={String:manufact111} hdrRec={String:H} }} {MapMsg:{ Manufacturer={String:manufact111} Model={String:modelnum1111} aXxXCONSTRAINTXxXa={String:dytstd} PartNo={String:partnumber1} dtlRec={String:D} Desc={String:description1111} }} } }
StreamMessage={ Header={ JMSMessageID={ID:EMS-SERVER.7B84B0D3513102:26} JMSDestination={Queue[DY.MRECFM.FILE.BACKUP]} JMSReplyTo={null} JMSDeliveryMode={PERSISTENT} JMSRedelivered={false} JMSCorrelationID={null} JMSType={null} JMSTimestamp={Thu Dec 03 10:03:44 EST 2009} JMSExpiration={0} JMSPriority={4} } Properties={ JMS_TIBCO_MSG_EXT={Boolean:true} } Fields={ {MapMsg:{ hDesc={String:description2222} hModel={String:modelnum2222} aXxXCONSTRAINTXxXa={String:dytsth} hPartNo={String:partnumber2} hManufacturer={String:manufact222} hdrRec={String:H} }} {MapMsg:{ Manufacturer={String:manufact222} Model={String:modelnum2222} aXxXCONSTRAINTXxXa={String:dytstd} PartNo={String:partnumber2} dtlRec={String:D} Desc={String:descriptionXXXX} }} {MapMsg:{ Manufacturer={String:manufact222} Model={String:modelnum2222} aXxXCONSTRAINTXxXa={String:dytstd} PartNo={String:partnumber2} dtlRec={String:D} Desc={String:description2222} }} } }
StreamMessage={ Header={ JMSMessageID={ID:EMS-SERVER.7B84B0D3513102:27} JMSDestination={Queue[DY.MRECFM.FILE.BACKUP]} JMSReplyTo={null} JMSDeliveryMode={PERSISTENT} JMSRedelivered={false} JMSCorrelationID={null} JMSType={null} JMSTimestamp={Thu Dec 03 10:03:44 EST 2009} JMSExpiration={0} JMSPriority={4} } Properties={ JMS_TIBCO_MSG_EXT={Boolean:true} } Fields={ {MapMsg:{ hDesc={String:description3333} hModel={String:modelnum3333} aXxXCONSTRAINTXxXa={String:dytsth} hPartNo={String:partnumber3} hManufacturer={String:manufact333} hdrRec={String:H} }} {MapMsg:{ Manufacturer={String:manufact333} Model={String:modelnum3333} aXxXCONSTRAINTXxXa={String:dytstd} PartNo={String:partnumber3} dtlRec={String:D} Desc={String:description3333} }} } }
MapMessage={ Header={ JMSMessageID={ID:EMS-SERVER.7B84B0D3513102:28} JMSDestination={Queue[DY.MRECFM.FILE.BACKUP]} JMSReplyTo={null} JMSDeliveryMode={PERSISTENT} JMSRedelivered={false} JMSCorrelationID={null} JMSType={null} JMSTimestamp={Thu Dec 03 10:03:44 EST 2009} JMSExpiration={0} JMSPriority={4} } Properties={ } Fields={ HOSTNAME={String:IBMI-V5R4.NA.TIBCO.COM} RecordNumber={Integer:0} filename={String:DY2A} eof={Boolean:true} numofretries={Integer:1} NumberOfMessages={Integer:3} trackingid={String:Kq2@@D@@GlPVoE@56azzxkDkzzw} version={String:5.0} USERID={String:} } }
 

Copyright © TIBCO Software Inc. All rights reserved
Copyright © TIBCO Software Inc. All rights reserved