User Tools

  • Vistasource Document Library

Publish

RTW offers the ability to publish and contribute market data using the RTW RMDS (SFC) and RTW RMDS (RFA) engines. While the terms “publish” and “contribute” are not synonymous, the term “publish” is used in this help for both concepts (unless otherwise specified).

The Microsoft® Excel RTD function is used to publish data. The RTD publish formula will execute when there is any change to the data that it references. If the publish is successful, the cell containing the RTD formula displays OK. If it is unsuccessful, the cell containing the RTD formula displays #VALUE.

RTSHARE users: Go to Working with RTSHARE and click on Insert.

The generic syntax for the Microsoft® Excel RTD function is as follows:

=RTD(ProgID, server, topic1, [topic2], …)

When using RTW to publish, the RTD function takes the following arguments:

=RTD(ProgId, server, command, dataRange, engine, servicename, recordname, fieldname1, […, fieldnameN])

The arguments have the following meaning:

ArgumentExplanation
ProgIDThe name of the RTW RTD Server, Vistasource.RtdServer.
Server Remains null.
Command”rtinsert”, to indicate the publish command.
Data RangeThe cell or cell range containing the value(s) to publish.
EngineThe name of the specific RTW engine, e.g. vsRMDS (RTW RMDS SFC) or vsRMDS2 (RTW RMDS RFA).
ServicenameThe name of the data feed/service.
RecordnameThe name of the record to publish.
Fieldname1The name of the first field, such as BID or ASK.
FieldnameNThe name of the last field.

Example of an RTD function for contributing with a two-part subject name
The following formula contributes the value in cell C15 as the BID of MyRec.O via the RTW RMDS (RFA) engine to the DTS service.

=RTD("Vistasource.RtdServer",,"rtinsert",C15,"vsRMDS2","DTS","MyRec.O"," BID")

Example of an RTD function for publishing with a four-part subject name
The following formula publishes the value in cell C15 as the BID of SH.ANY.MyRec.NaE via the RTW RMDS (RFA) engine to the SH service.

=RTD("Vistasource.RtdServer",,"rtinsert",C15,"vsRMDS2","SH","SH.ANY.MyRec.NaE"," BID")

Example of an RTD function for publishing multiple fields
To publish multiple field values with one formula, the RTD function would need to receive an array of data. However, RTD does not support this functionality
(see Microsoft KB article 286258).

To work around this limitation, the RTW wrapper function PACKAGE_DATA must be used. This function “packages” the range of values to publish as a string. The Publish dialogs will automatically use the PACKAGE_DATA function when publishing a range of fields. See RTW Functions for more information about PACKAGE_DATA and other wrapper functions.

The following formula publishes the values in cells D3 and D4 to the fields BID and ASK in record SH.ANY.MyRec.NaE via the RTW RMDS (RFA) engine using the PACKAGE_DATA function:

=RTD("vistasource.rtdserver",,"rtinsert",PACKAGE_DATA(D3:D4),"vsRMDS2","DTS"," SH.ANY.MyRec.NaE","BID","ASK")

where DTS (Data Transformation System) is the name of the service to which you are publishing.

The PACKAGE_DATA function can also be used to package a range of field names. For example:

=RTD("vistasource.rtdserver",,"rtinsert",PACKAGE_DATA(D3:D4),"vsRMDS2","DTS"," SH.ANY.MyRec.NaE",PACKAGE_DATA(C3:C4))

in which case BID would be in C3 and ASK would be in C4, and DTS (Data Transformation System) is the name of the service to which you are publishing.

See Also: