Some of my clients every day or every week load Exchange Rates into ERP’s exchange tables … so I Googled for something and I stumbled upon this IBM guide: Accessing web services using IBM DB2 for i HTTP UDFs and UDTFs … I took the cue from it for this simple utility.Dettagli
Does anybody remember “1, 2, 3 ,4 gimme some more ” by DDSound , was 1978 and I was a child …
When I tried to use DB2 for i OLAP functions to make a simple ABC Analysis (Pareto) I found out that OVER() work only with ROW_NUMBER(), RANK() and DENSE_RANK(), if I need a SUM() or AVG() or something else I can’t use OVER() !
“Hey Rochester, Gimme some more !”Dettagli
I think that not everybody knows IFTTT If This Than That, an awsome App that let we connect events and actions from different Apps or things o spaces.
For my part, for instance, I have a lot of “Recipes” on IFTTT: “Insert my prefered tweets in a Google Docs” or “Write on my Google Calendar enter/exit date-time from my customer locations” etc.
So, why not ? Why don’t integrate IFTTT functions with my IBMi ?
Maybe I can turn on a red-light from my IBMi or Notify my Iphone or start my washer machine when … ok, ok, maybe this is not so usefull.
Let’s we try to send a IOS Notification to my Iphone when receive some specific CPF messages in QSYSOPR queue … with only few RPG rows and fantastic DB2 for i functions HTTPGETCLOB (read also my previous post to see another use of HTTPGETCLOB functions (Bitcoins and IBMi / AS400)).
Continue reading if you like IFTTT
This is a good drawing card to catch your eyes at this post where we use some DB2 for i HTTP Functions …
Sorry, this is not a porting of Blockchain and Bitcoins applications on our loved IBMi … but we can use new SQL HTTP Functions to call Webservices … get JSON data … store them in a table with a Blob field and parse JSON only with some SQL statements. I hope not let you down !
We’ll see only 3 UDFs and UDTFs … stay tuned on http://www.faq400.com to see more next days …
- HTTPGETCLOB: Call a Rest Webservice in GET
- JSON2BSON: Store JSON in a Blob field
- JSON_VAL: Get values (parsing) from a JSON
From IBMi 7.1 TR9 or 7.2 TR1 we can use Regular Espressions with SQL DB2 for i … Regular Espressions aren’t like a walk in the park to understand but they are very powerful.
Prerequisites, other then TR9 for 7.1 and TR1 for 7.2, is 5770SS1 Option 39 International Components for Unicode ..
You can learn something about Regex in this great post by Michael Sansoterra:
Let’s we see something else from our tests …Dettagli
I this post we will take a look to some SQL Scalar Functions (DB2 SQL for i) … let’s get started with a temporary table and some example data …Dettagli