MATLAB: Do I get an error while trying to connect to the Bloomberg Data License Connection using bdl with FTP credentials

bdlbloombergconnectioncredentialsdataDatafeed Toolboxerrorexceptionftpjavalicensesftp

How can I get rid of the following error when I try to use 'bdl'? I am able to use my credentials in request builder and able to connect to ftp location and submit request files.
Undefined variable "Account" or class "Account.FTP_OPTION_SFTP".
Error in bdl (line 101)
accountContext =
AccountContext(String(lgon),String(pword),String(hostname),Integer(port),Account.FTP_OPTION_SFTP,String(authoption),String(keyfile),String(passphrase));

Best Answer

In order to connect to the Bloomberg Data License connection from MATLAB, the following JAR files are needed to be added on the MATLAB Java Classpath.
- bbdl.jar
- bbdlftp.jar
- bbdlapi.jar
For details about these JAR files, see the Data License Java SE API folder. Find this folder by entering DLSD and clicking <GO> in the Bloomberg terminal. These JAR files are usually downloaded in the 'C:\Bloomberg\...' path of your computer.
In order to add these JAR files to the MATLAB Java Classpath, execute the following commands.
>> javaaddpath('C:\Bloomberg\....\bbdlapi.jar');
>> javaaddpath('C:\Bloomberg\....\bbdl.jar');
>> javaaddpath('C:\Bloomberg\....\bbdlftp.jar');
Once the files are added to the MATLAB Java Classpath, execute the following command to save the userpath and then restart MATLAB to use the Bloomberg Data License Connection.
>> userpath
The Bloomberg Data License Connection is accessible from MATLAB only via SFTP. We have not incorporated the FTP to connect to the Bloomberg Data License Connection as Bloomberg is going to remove FTP access soon. If you have not migrated to SFTP, please contact Bloomberg to migrate to SFTP credentials.
If you still encounter the error message, it might be because the ".jar" file that they are using is not the latest version. The "bbdl.jar" in the attached ".zip" file is the only one needed for BDL. Steps to follow:
1) Execute the following in the MATLAB Command Window:
>> javarmpath('C:\Bloomberg\....\bbdl.jar')
Where 'C:\Bloomberg\...' path of your computer is the path to the folder where the JAR files are usually downloaded in.
2) Open the folder containing the JAR files.
3) Replace the bbdl.jar in this folder with the attached newer version. Please note that the attachment is a ZIP file, so please extract the bbdl.jar file before adding it to the folder.
4) Add the JAR file to the MATLAB Java Classpath by executing the following in MATLAB Command Window
>> javaaddpath('C:\Bloomberg\....\bbdl.jar');