question

Upvotes
Accepted
11 2 1 7

How to clear date FID using RFA.NET and C#?

I'm using RFA.NET v8.0.1 with C#, writing to an MLIP server.

How can I set a date FID, eg FID 68 (MATUR_DATE) so that it clears the date on the display template?

I'm setting the date properties like this in the code:

RFA.Data.Date dateobj = new RFA.Data.Date();
dateobj.Day = 31; //1; //-0; //0;
dateobj.Month = 12; //1; //-0; //0;
dateobj.Year = 1899; //1900; //-0; //0;
dataBuffer.Date = dateobj;

But I get the following results:

Setting -0s/0s for each = no effect, date didn’t change
Setting (d,m,y) 1, 1, 1900 --> displayed is “01JAN00”
Setting (d,m,y) 31,12,1899 --> displayed is “31DEC99”

Also tried SetBlankData. Had no effect and was ignored by MLIP server even though blank/empty field was sent in Trace file:

dataBuffer.SetBlankData(ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.Date);

Also tried sending 11 space characters but it was also ignored. The Trace file contained:

<fieldEntry fieldId="68" data="2020 2020 2020 2020 2020 20"/>

Also tried, without success (different attempts in comments) !

RFA_String rfaString = new RFA_String("       "); //"-0"  "-1" " " "           "
dataBuffer.SetFromString(rfaString, ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.StringRMTES);
RFA.Data.Real realobj = new RFA.Data.Real();
realobj.MagnitudeType = MagnitudeTypeEnum.Exponent0;
realobj.Value = -1; //-0
dataBuffer.Real = realobj;

How can I clear a Date FID using RFA.NET ?

treprfarfa-apifields
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
11.3k 25 8 13

@Louise Kellett

I understand that your applciation inserts data to MLIP via OMM Posting. Is this correct?

The setBlankData should be appropriate method to clear data in a field. However, the MLIP is MarketFeed/SSL application, so OMM Post needs to be converted to SSL Insert by TREP. It is possible that the blank data is converted to data format that MLIP doesn't support.

There is a TREP configuration parameter, convertToIDNStyle, related to the OMM to Marketfeed conversion of Blank Fields. Please verify if the convertToIDNStyle is enabled in your TREP.

Below is the related information in the ADS Installation Guide document.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
11 2 1 7

Thank you, Veerapath

I can confirm that the RFA api call SetBlankData cleared the date fields successfully on change of the parameter setting, convertToIDNStyle.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.