Real Time Information Director User Documentation

RTID Subscriptions
Hewlett-Packard Company 15 529618 - 002
It is a requirement that the master table on which the subscription is registered contain a
DATETIME field that contains a unique value for each record.
It is a requirement that this DATETIME field be the last column in the SELECT clause
list
It is a requirement that this DATETIME field be the only column in the WHERE clause
of the SELECT statement to which a value is set at run time.
For example, in the RTSC data model, the SALES_ORDER table has
SYSTEM_UPDATE_DT column that has the last modified date for the sales order. The
subscription for the SALES_ORDER uses the following SQL statement.
SELECT SALES_ORGANIZATION_CD, SALES_ORDER_NO, SOURCE_NM,
SYSTEM_UPDATE_DT FROM STREAM(SALES_ORDER) WHERE SYSTEM_UPDATE_DT > ?
ORDER BY SYSTEM_UPDATE_DT
This way the STREAM select returns only any newly inserted sales order.
Example
The following is a sample XML file that can be used as input to RegSubs.sh. The
example describes two subscriptions:
The first delivers documents matching the ORDERS05 IDoc format to a JMS
Queue called OutboundQueue.
The second delivers documents matching the INVOIC01 IDoc format to a JMS
Topic called OutboundTopic.
The file $RTID_HOME/bin/SubServ.xml contains more examples of subscriptions.
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSPY v5 rel. 4 U (http://www.xmlspy.com)-->
<Subscriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=".\SubServ.xsd">
<SubInfo>
<DocName>ORDERS05</DocName>
<DestQueueName>OutboundQueue</DestQueueName>
<SQLstmt>SELECT SALES_ORGANIZATION_CD, SALES_ORDER_NO, SOURCE_NM,
SYSTEM_UPDATE_DT FROM STREAM(SALES_ORDER) WHERE SYSTEM_UPDATE_DT > ?
ORDER BY SYSTEM_UPDATE_DT </SQLstmt>
</SubInfo>
<SubInfo>
<DocName>INVOIC01</DocName>
<DestTopicName>OutboundTopic</DestTopicName>
<SQLstmt>SELECT COMPANY_CD, BILLING_DOCUMENT_NO, SOURCE_NM,
SYSTEM_UPDATE_DT FROM STREAM(BILLING_DOCUMENT) WHERE SYSTEM_UPDATE_DT
> ? ORDER BY SYSTEM_UPDATE_DT
</SQLstmt>