
Last Updated on 24 February 2025 by Roberto De Pedrini
Some of my clients every day or every week load Exchange Rates into ERP’s exchange tables: with a few lines of code we can get rates from ECB (BCE) through their Web API directly from our IBM i – RPG and SQL, take a look at this few lines of code in my Github GIST repository:
https://gist.github.com/Faq400Git/72431bdeb7998b081cce3b29cb0fe89a
As you can see in the source code we are using SYSTOOLS.HTTPGETBLOB to invoke ECB web server and XMLTABLE to parse the XML returned … it’s simple … what do you think about it?
Pay attention: this web service is an SSL HTTPS web service. There are some pre-requisites for your system … like a *SYSTEM certificate in your DCM repository (https://www.ibm.com/support/pages/how-create-system-store-dcm)
Update February 2025: I just added a new post with a practical guide to update certificates for Java and DCM:
CA Certificate Update for the European Central Bank (ECB): A Practical Guide
Hi Roberto
I tried your example with success!
Thank you for that
But I tried to replace HTTPGETBLOB by QSYS2.HTTP_GET
That didn’t work.
I get a SSL connection error. (SQL-status: 38501, SQL0443)
failed to establish SSL connection to the server.
Certificate is not signed by a trusted certificate authority.
Strange message since HTTPGETBLOB works fine.
Any idea what’s wrong?
Grtz
Mahy