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)

Related Posts
DB2 for i SQL – String Manipulation – POSSTR-LOCATE-LOCATE_IN_STRING (EN)

Introduction Often, in our applications, we need to work with text strings, and DB2 SQL can come in very useful Read more

DB2 for i – FAQ & Howtos (EN)

DB2 Database and SQL ... maybe the most important things on IBM i platform: here's a collection of FAQs, tips Read more

IBM i 7.4 Announcement (En)

Comes directly with the Easter egg this IBM announcement for the news of the IBM i 7.4 version, iNext version Read more

Generated Always Columns (EN)

Introduction "Generated Always Column": are columns, table fields, filled by DB2 engine: something like columns with a default value but Read more

--- Roberto De Pedrini Faq400.com

Recent Posts

SQL: SELECT with “superpowers”

With a little trick even a simple SELECT statement can execute any system command! Let's see how to do that...

5 months ago

NetServer for everyone – part 5

A mini-serial guide to configuring, managing, using, and troubleshooting the IBM i NetServer

1 year ago

NetServer for everyone – part 4

A mini-serial guide to configuring, managing, using, and troubleshooting the IBM i NetServer

1 year ago

NetServer for everyone – part 3

A mini-serial guide to configuring, managing, using, and troubleshooting the IBM i NetServer

1 year ago

NetServer for everyone – part 2

A mini-serial guide to configuring, managing, using, and troubleshooting the IBM i NetServer

1 year ago

NetServer for everyone – part 1

A mini-serial guide to configuring, managing, using, and troubleshooting the IBM i NetServer

1 year ago