Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TREP APIs /
  • RFA /
avatar image
Question by THUANTRU.HANG · Aug 20, 2019 at 07:47 AM · ATSrics.net c#

RIC deletion using C# .NET

Hi,

I have written a c# program, which shall create and delete RICs on ATS.

The RIC creating works fine but RIC deleting does not work.

The return message at deleting is

"[900]: Service Denied"

I use the same function for creating and deletion but with different parameters like RtContribution() in Excel.

Does anyone have a hint for me ?

Or an example how deletes RICs with .net c#

Thanks in advance.

Regards,

Tru

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

12 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by jirapongse.phuriphanvichai · Aug 21, 2019 at 06:40 AM

@THUANTRU.HANG

The ATS_DELETE_ALL can be used to delete any records. Therefore, you need to specify the RIC name in the field list via the X_RIC_NAME (-1) field. For exmaple:

<postMsg domainType="RSSL_DMT_MARKET_PRICE" streamId="1" containerType="RSSL_DT_MSG" flags="0x66 (RSSL_PSMF_HAS_POST_ID|RSSL_PSMF_HAS_MSG_KEY|RSSL_PSMF_POST_COMPLETE|RSSL_PSMF_ACK)" postId="1" postUserId="0" postUserAddr="0.0.0.0" dataSize="42">
    <key  flags="0x3 (RSSL_MKF_HAS_SERVICE_ID|RSSL_MKF_HAS_NAME)"  serviceId="267" name="ATS_DELETE_ALL"/>
    <dataBody>
<!-- rwfMajorVer="14" rwfMinorVer="0" -->
        <updateMsg domainType="RSSL_DMT_MARKET_PRICE" streamId="0" containerType="RSSL_DT_FIELD_LIST" flags="0x8 (RSSL_UPMF_HAS_MSG_KEY)" updateType="0 (RDM_UPD_EVENT_TYPE_UNSPECIFIED)" dataSize="13">
            <key  flags="0x2 (RSSL_MKF_HAS_NAME)"  name="ATS_DELETE_ALL"/>
            <dataBody>
                <fieldList flags="0x8 (RSSL_FLF_HAS_STANDARD_DATA)">
                    <fieldEntry fieldId="-1" data="5445 5354 2E42 4B"/>
                </fieldList>
            </dataBody>
        </updateMsg>
    </dataBody>
</postMsg>
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by umer.nalla · Aug 20, 2019 at 09:59 AM

Hi @THUANTRU.HANG

Can you share the code snippet you are using?

According to the ATS documentation,

900]: Service Denied The record name is incorrect or does not exist.

How are you specifying the name of the RIC to delete? You should be using FID -1 to specify the RIC code you wish to delete.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by THUANTRU.HANG · Aug 20, 2019 at 10:23 AM

Hi @Umer Nalla,

The record name is exactly the name which I have created the RIC before.

Enclosed is the function to create and to delete RICs

//---------------------------------------------------------------------------------------------------------------

public void Insert_Update(uint iPostID, string strService, string strRIC, string[] arrFID, string[] arrValue, string strPPE)

{

PostMsg postMsg = newPostMsg();

postMsg.MsgModelType = RDM.MESSAGE_MODEL_TYPES.MMT_MARKET_PRICE;

postMsg.IndicationMask = PostMsg.IndicationMaskFlag.MessageInit | PostMsg.IndicationMaskFlag.MessageComplete | PostMsg.IndicationMaskFlag.WantAck;

AttribInfo attribInfo = newAttribInfo();

attribInfo.NameType = RDM.INSTRUMENT_NAME_TYPES.INSTRUMENT_NAME_RIC;

attribInfo.ServiceName = newRFA_String(strService);

attribInfo.Name = newRFA_String(strRIC);

postMsg.AttribInfo = attribInfo;

postMsg.PostID = iPostID;

RespMsg respMsg = newRespMsg();

respMsg.MsgModelType = RDM.MESSAGE_MODEL_TYPES.MMT_MARKET_PRICE;

respMsg.RespType = RespMsg.RespTypeEnum.Update;

respMsg.AttribInfo = attribInfo;

System.DateTime current = System.DateTime.Now;

m_recordInsertFormat.ClearInsertList();

for (int i = 0; i < arrFID.Count(); i++)

{

m_recordInsertFormat.AddItem(newRFA_String(arrFID[i]), newRFA_String(arrValue[i]));

}

respMsg.Payload = m_recordInsertFormat.EncodedBuffer();

postMsg.Payload = respMsg;

if (strPPE.Length > 0)

{

// Permission data may be included in the PostMsg for the user to be permissioned to post

// information, using the PostMsg.PermissionData property.

int serviceId = 267;

int peOperator = ThomsonReuters.RFA.DACS.AuthorizationLock.OperatorEnum.OR;

List<uint> peList = newList<uint>();

// peList.Add(10004);

peList.Add(uint.Parse(strPPE));

ThomsonReuters.RFA.Common.Buffer buffer = new ThomsonReuters.RFA.Common.Buffer();

ThomsonReuters.RFA.DACS.AuthorizationLock authLock = new ThomsonReuters.RFA.DACS.AuthorizationLock(serviceId, peOperator, peList);

ThomsonReuters.RFA.DACS.AuthorizationLockData lockData = new ThomsonReuters.RFA.DACS.AuthorizationLockData();

ThomsonReuters.RFA.DACS.AuthorizationLockStatus retStatus = new ThomsonReuters.RFA.DACS.AuthorizationLockStatus();

ThomsonReuters.RFA.DACS.AuthorizationLockData.LockResultEnum result = authLock.GetLock(lockData, retStatus);

if (result != ThomsonReuters.RFA.DACS.AuthorizationLockData.LockResultEnum.LOCK_SUCCESS)

{

authLock.Dispose();

}

byte[] c_LockData = lockData.LockData;

int c_LockDataSize = lockData.Size;

buffer.SetFrom(c_LockData, c_LockDataSize, c_LockDataSize);

postMsg.PermissionData = buffer;

}

OMMHandleItemCmd handleCmd = newOMMHandleItemCmd();

handleCmd.Msg = postMsg;

handleCmd.Handle = m_loginHandle;

m_ommConsumer.Submit(handleCmd);

Console.WriteLine("Submit Post Msg for Update");

}

//---------------------------------------------------------------------------------------------------------------

In the for loop for deletion I use following values

for (int i = 0; i < arrFID.Count(); i++)

{

m_recordInsertFormat.AddItem(newRFA_String(arrFID[i]), newRFA_String(arrValue[i]));

}

arrFID.Count = 2

arrFID[0] = -1

arrFID[1] = -8

arrValue[0] = "RICTODELETE"

arrValue[0] = "ATS"

The input parameter strRIC has the value "ATS_DELETE_ALL"

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by umer.nalla · Aug 20, 2019 at 11:22 AM

Hi @THUANTRU.HANG

Its been a while since I used ATS and I am not in a position to test this right now, but I dont beleive you need to specify the Business Unit (BU) when deleting a record.

Please try again without the -8 FID and its value.

If that does not work, I recommend you raise an API Support Ticket so that we can carry out some detailed investigation offline.

If you cannot access the Support Ticket link, please speak to your Refinitiv Account manager or try creating a ticket via the My.Refinitiv page against the ATS product.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by moragodkrit.chumsri_1 · Aug 20, 2019 at 10:06 PM

@THUANTRU.HANG

Can you please turn on RSSL Trace in RFA? so we can see incoming and outgoing message RFA send and receive from Provider server. You may following the instruction from this post to turn on RSSL trace file.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by THUANTRU.HANG · Aug 21, 2019 at 04:18 AM

@Umer Nalla,

I have remove -8 FID and its value. The result is the same [900]: Service DeniedNackCode.

When I try to open "API Support Ticket" i get this apisupportticket.jpg,

I will try to create a ticket via the My.Refinitiv page if there are no further instruction.

I use MSVS 2015, DACS8_lib_NET120.dll, DACS8_lock_NET120.dll and RFA8_NET120.dll.

@moragodkrit,

I have modified the RFA.cfg as described in the post, but there are no incoming and outgoing message regarding RIC deletion.

Can you please take a look, whether the configurations are ok ?

My RFA.cfg

/***************************************************************************************/

\Connections\<Connection_RSSL>\traceMsgToFile = true
\Connections\<Connection_RSSL>\tracePing = true
\Connections\<Connection_RSSL>\traceMsgFileName = "RSSLConsumerTrace"
\Connections\<Connection_RSSL>\traceMsgDomains = "all"
\Connections\<Connection_RSSL>\traceRespMsg = true
\Connections\<Connection_RSSL>\traceReqMsg = true
\Connections\<Connection_RSSL>\traceMsgHex = false
\Connections\<Connection_RSSL>\traceMsgMaxMsgSize = 200000000
\Connections\<Connection_RSSL>\traceMsgMultipleFiles = true

\Connections\Connection_SSLED_RMDS_Sub\traceFilterOutRequests="false"
\Connections\Connection_SSLED_RMDS_Sub\traceFilterOutCloses="false"
\Connections\Connection_SSLED_RMDS_Sub\traceFilterOutStatuses="false"
\Connections\Connection_SSLED_RMDS_Sub\traceFilterOutRefreshes="false"

\Sessions\Session1\connectionList = "Connection_RSSL"
\Logger\AppLogger\windowsLoggerEnabled = false
\Logger\AppLogger\fileLoggerEnabled = true
\Logger\AppLogger\useInternalLogStrings = true

/***************************************************************************************/

My rfa.log

/***************************************************************************************/

[Wed Aug 21 09:45:24 2019]: (ComponentName) Static: (Severity) Information: Config Tree for the RSSL_Cons_Adapter is not found, using default configuration

[Wed Aug 21 09:45:24 2019]: (ComponentName) Static: (Severity) Information: The RSSL_Cons_Adapter initialization succeeded

[Wed Aug 21 09:45:24 2019]: (ComponentName) Static: (Severity) Information: Using the following configuration for RSSL_Cons_Connection_Manager "Default::Connection_RSSL": requestQueueReadThreshold = 1, watchListTableSize = 10007, requestTimeout = 45000, itemPostTimeout = 15000, payloadCacheEnabled = False, payloadCacheLoadFileDictionary = True, payloadCacheDictionaryName = RDMFieldDictionary, payloadCacheDictionaryPerService = False, Connection capabilities: OMMMsgConnCapability

[Wed Aug 21 09:45:24 2019]: (ComponentName) Static: (Severity) Warning: Batch request size may be limited due to throttling on RSSL_Cons_Connection "Default::Connection_RSSL MyTestServer.com:14002"

[Wed Aug 21 09:45:24 2019]: (ComponentName) Static: (Severity) Information: Using the following configuration for RSSL_Cons_Connection "Default::Connection_RSSL MyTestServer.com:14002": hostName = "MyTestServer.com", rsslPort = "14002", interfaceName = "localhost", compressionType = 0, channelBlocking = false, recvBufSize = 65535, sendBufSize = 65535, writeBufferMaxFragmentLength = 6144, connectionWaitTimeout = 30000, connectionPingTimeout = 30000, guaranteedOutputBuffers = 400, numInputBuffers = 20, tcp_nodelay = True, throttleEnabled = True, throttleType = count, throttleMaxCount = 250, throttleBatchCount = 10, traceMsg = False, traceMsgToFile = False, dictionaryRequestTimeout = 45

[Wed Aug 21 09:45:25 2019]: (ComponentName) Static: (Severity) Information: RSSL channel init in progress for connection "Default::Connection_RSSL MyTestServer.com:14002".

[Wed Aug 21 09:45:25 2019]: (ComponentName) Static: (Severity) Information: RSSL channel connected for connection "Default::Connection_RSSL MyTestServer.com:14002".

[Wed Aug 21 09:45:25 2019]: (ComponentName) Static: (Severity) Information: RSSL channel connected with "Requested version: 14.1, Connected version: 14.1" for connection "Default::Connection_RSSL MyTestServer.com:14002".

[Wed Aug 21 09:45:25 2019]: (ComponentName) Static: (Severity) Information: RSSL channel on connection "Default::Connection_RSSL MyTestServer.com:14002" has negotiated ping timeout set to: 30000

[Wed Aug 21 09:45:25 2019]: (ComponentName) Static: (Severity) Information: Connection Status Changed, RSSL_Cons_Connection "Default::Connection_RSSL MyTestServer.com:14002" State: "Up" StatusCode: "None" StatusText: Connection up

[Wed Aug 21 09:45:25 2019]: (ComponentName) Static: (Severity) Warning: Connection "Connection_RSSL" does not support views. View requests will be converted to full item requests for this connection.

[Wed Aug 21 09:45:25 2019]: (ComponentName) Static: (Severity) Warning: Connection "Connection_RSSL" does not support Pause/Resume. Pause and Resume requests for this connection will be ignored.

[Wed Aug 21 09:45:25 2019]: (ComponentName) Static: (Severity) Warning: Connection "Connection_RSSL" does not support optimized Pause/Resume. Optimized Pause/Resume requests will be converted to individual item Pause/Resume requests for this connection.

[Wed Aug 21 09:46:18 2019]: (ComponentName) Static: (Severity) Warning: Connection "Connection_RSSL" does not support views. View requests will be converted to full item requests for this connection.

[Wed Aug 21 09:46:18 2019]: (ComponentName) Static: (Severity) Warning: Connection "Connection_RSSL" does not support Pause/Resume. Pause and Resume requests for this connection will be ignored.

[Wed Aug 21 09:46:18 2019]: (ComponentName) Static: (Severity) Warning: Connection "Connection_RSSL" does not support optimized Pause/Resume. Optimized Pause/Resume requests will be converted to individual item Pause/Resume requests for this connection.

[Wed Aug 21 09:54:33 2019]: (ComponentName) Static: (Severity) Information: RSSL Channel closing on connection "Default::Connection_RSSL MyTestServer.com:14002" due to "requested disconnect"

/***************************************************************************************/


apisupportticket.jpg (66.2 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by moragodkrit.chumsri_1 · Aug 21, 2019 at 04:28 AM

@THUANTRU.HANG

Are you using connection named "Connection_RSSL"?, please change <Connection_RSSL> to Connection_RSSL.

Note that if you add the configuration to a right Connection, RFA will generate XML file named RSSLConsumerTrace_<pid>.xml under running directory and it's separated from RFA.log.



Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by THUANTRU.HANG · Aug 21, 2019 at 05:26 AM

rsslconsumertrace-21816.zip@moragodkrit,

thank for the hint.

Now I get the messages logged.

I created a RIC named TESTTRU10 and it works. Then I wanted to delete it but it fails.

Can you please take a look at the log file ?

Thanks.


rsslconsumertrace-21816.zip (1.2 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by umer.nalla · Aug 21, 2019 at 06:31 AM

Hi @THUANTRU.HANG

A quick look at the trace file, I can see a FieldList in the payload of the ATS_RM_CREATE PostMsg you send for the record creation, but the FieldList is empty on the ATS_DELETE_ALL PostMsg.

So, it would appear the field list is not correctly encoded for the delete message.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by THUANTRU.HANG · Aug 21, 2019 at 07:27 AM

@Umer Nalla,

instead of -1 I use X_RIC_NAME and it works. Normally in Excel we can use FID name or FID number in RtGet() and RtContribution(). Therefore I have mixed it, for creating I use FID names and for deleting I used FID numbers, that why it does (not) work.

I don't know whether it is intended to from your side to do it this way. If it I would say it is a "bug".

However thanks for the help.

Regards,

Tru

/***********************************************************************************/

Now in the for loop for deletion the parameters have following values (and it works)

for (int i = 0; i < arrFID.Count(); i++)

{

m_recordInsertFormat.AddItem(newRFA_String(arrFID[i]), newRFA_String(arrValue[i]));

}

arrFID.Count = 1

arrFID[0] = "X_RIC_NAME"

arrValue[0] = "RICTODELETE"

The input parameter strRIC has the value "ATS_DELETE_ALL"

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by umer.nalla · Aug 21, 2019 at 08:10 AM

Hi @THUANTRU.HANG

That is odd indeed - since the Record creation works fine with FID -1 , FID -8 etc.

If you are using local data dictionary file, then you could try adding X_RIC_NAME FID -1 definition to your local RDMFieldDictionary file. You should be able to find the definition in the RDMFieldDictionary file that comes with your ATS package - in an etc subfolder - and would look something like:

X_RIC_NAME  "RIC NAME"   -1      NULL    ALPHANUMERIC    32  RMTES_STRING    32

If you are downloading the Data dictionary from the ADS, then you can ask your Market Data team to update their RMDFieldDictionary file to include the ATS FIDs - as defined in the ATS version of the file.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by THUANTRU.HANG · Aug 21, 2019 at 09:02 AM

Hi @Umer Nalla

rdmfielddictionary.jpg

The RDMFieldDictionary file, which I use, has X_RIC_NAME definition already.

Regards,

Tru


rdmfielddictionary.jpg (200.3 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
8 People are following this question.

Related Questions

ATS Contribution not working with ValueAdd since migration from RFA 7.4 to RFA8

Update several RICS with one OmmConsumer.Submit()

Create OMMItemEvent and Data.FieldList - RFA.NET

.Net System.AccessViolationException when calling OMMProvider.Submit on a RespMsg containing a status.

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges