Close Elektron from Refinitiv connection




close(c) closes the Elektron™ from Refinitiv™ connection.


collapse all

Create a Elektron connection. Then, retrieve current market data. The current market data you see when completing this example can differ from the output data shown.

Add Elektron JAR files to the dynamic Java® class path. Find these JAR files in the installation folder. Here, the installation folder is i:\Elektron.

javaaddpath i:\Elektron\ansipage.jar
javaaddpath i:\Elektron\ema-javadoc.jar
javaaddpath i:\Elektron\ema.jar
javaaddpath i:\Elektron\jdacsUpalib.jar
javaaddpath i:\Elektron\upa.jar
javaaddpath i:\Elektron\upaValueAdd.jar
javaaddpath i:\Elektron\upaValueAddCache.jar
javaaddpath i:\Elektron\commons-configuration-1.10.jar
javaaddpath i:\Elektron\commons-lang-2.6.jar
javaaddpath i:\Elektron\commons-logging-1.2.jar
javaaddpath i:\Elektron\org.apache.commons.collections.jar
javaaddpath i:\Elektron\slf4j-api-1.7.12.jar
javaaddpath i:\Elektron\slf4j-jdk14-1.7.12.jar

Alternatively, add these JAR files to the static Java class path. For details about dynamic and static class paths, see Java Class Path.

Connect to Elektron using a user name and service name. c is an elektron object.

username = 'username';
servicename = 'servicename';

c = elektron(username,servicename)
 c =

 elektron with properties:
    IPAddress: 'localhost'
         Port: 14002
      Service: 'servicename'
     Username: 'username'

Retrieve current data for the IBM® security using the Elektron connection.

d is a table that contains the current data. The variables are:

  • FieldId — Elektron field identifier

  • DataType — Elektron data type of the Elektron field

  • Name — Elektron field name

  • Value — Current Elektron data value

s = 'IBM.N';
d = getdata(c,s)
d = 

  284×4 table array

    FieldId    DataType        Name                Value         
    _______    ________    ____________    ______________________

    [    1]    [18]        'PROD_PERM'     '62'                  
    [    2]    [18]        'RDNDISPLAY'    '67'                  
    [    3]    [31]        'DSPLY_NAME'    'DELAYED-15INTL B'    

Access the first three field names in the current data.

ans =

  3×1 cell array


Close the Elektron connection.


Input Arguments

collapse all

Elektron connection, specified as an elektron object created using the elektron function.

Introduced in R2017a