05a - IBM i Web Services miscellanea

Get Euro Exchange Rates from ECB/BCE WebService

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

Related Posts
CA Certificate Update for the European Central Bank (ECB): A Practical Guide

Updating Java and DCM Certificates for ECB Exchange Rate Retrieval on IBM i In our blog, we have previously discussed Read more

--- Roberto De Pedrini Faq400.com

View Comments

  • 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

Recent Posts

VsCode Extention: Bob Cozzi’s RPG IV to RPG Free Conversion

👉 Review: Bob Cozzi’s RPG IV to RPG Free Conversion – a useful VS Code extension for RPG modernization If…

4 months ago

IBM i & SQL Tips #010 – Locating Programs in the Call Stack with STACK_INFO

Hello everyone, I’d like to highlight another excellent contribution by Massimo Duca, part of his ongoing IBM i & SQL…

4 months ago

Trying out “Display File DDS Edit” for VS Code

Intrigued by some recent posts from Cristian Larsen on LinkedIn (New Release – Display File DDS Edit v 0.10.1), I…

5 months ago

Project Bob: the next-gen AI partner for IBM i and IBM Z application development

Hello everyone, Today I’d like to draw your attention to a major new announcement from IBM: Project Bob — a…

5 months ago

IBM i & SQL Tips #6: Calling REST APIs and Parsing JSON Responses with SQL

I want to share with you a particularly useful article by Massimo Duca in the IBM i & SQL Tips…

6 months ago

How Parameter Passing Works in IBM i Programs (RPG / Cobol)

Hello everyone, I’d like to highlight a very useful article by Marco Riva on Markonetools, where he clearly explains how…

6 months ago