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 naresh.patel · Jul 27, 2018 at 05:51 AM · rfa config environment variable

RFA Config file - using environment variables

Hi

I’ve developed some code based on RFA example StarterConsumer_Batchview and I need to set the hostname using an environment variable. Does the Config file support something like this :

\Connections\Connection_RSSL\hostName = ${REUTERS_HOST}

Thanks

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.

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by umer.nalla · Jul 27, 2018 at 07:05 AM

Hi @naresh.patel

I am not aware of a way of using Environmental variables within a .cfg file.

However, RFA does allow you to modify the StagingConfigDatabase after you load / populate it from a file.

You should then be able to add a entry to the StagingConfigDatabase with the value read from your environmental variable (e.g. read programmatically or passed in on the command line?).

result = _pStgCfgDataBase->load(flatFile, exampleRfaCfgFilePath);

if(result)
	pStgCfgDatabase->setString("\\Connections\\Connection_RSSL\\serverList", "myserver1 myserver2");

result = _pCfgDataBase->merge(*_pStgCfgDataBase);

In the above example after the flatfile has been loaded, I am adding a serverList parameter to the connection - with two servers myserver1 and myserver2

You should really be using a serverList rather than hostName - to allow the API to attempt failover in case one server is not available / cannot connect / loses connection. Please read the RFA ConfigGuide description for serverList for more details.

NOTE: You can add entries to the Staging Config Database - you cannot override existing - so ensure you don't include the severList (or any other) parameter in the .cfg if you plan to add it as above.

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 naresh.patel · Jul 27, 2018 at 07:27 AM

Thank you for your reply Umer. That really helped and thanks for the server list tip too.

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.
  • 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