× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks John, appreciated!

________________________________
From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Jon Paris <jon.paris@xxxxxxxxxxxxxx>
Sent: 19 November 2019 16:00
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxxxxxxxx>
Subject: Re: [WEB400] json_table(httpgetclob, nested array

Very useful Tim - many thanks.



On Nov 19, 2019, at 4:49 AM, Tim Fathers <X700-IX2J@xxxxxxxxxxx> wrote:

Ok, here's a complete example of calling a JSON webservice from embedded RPG https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ffathert%2Fjson-rpg-example%2Fblob%2Fmaster%2Fopen-weather.sqlrpgle&amp;data=02%7C01%7C%7C97a4f926a90a42764e0608d76d0131ca%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637097724203839378&amp;sdata=pzppIXIcMBvQMhWDTWWW%2F5UCFlK1NiPAx0Jur8uhn7c%3D&amp;reserved=0

It uses the sample APIs provided at OpenWeatherMap (https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopenweathermap.org%2Fcurrent%23severalid&amp;data=02%7C01%7C%7C97a4f926a90a42764e0608d76d0131ca%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637097724203839378&amp;sdata=Cu3Afb2CDTxc4Rk6TATKyjpiLhTO6YzloO2d5AHBR9Q%3D&amp;reserved=0) As it's only a sample API, any old input gives the same output, which you can see by clicking on the link on the website.

I hope this helps.

Tim.


________________________________
From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Booth Martin <booth@xxxxxxxxxxxx>
Sent: 18 November 2019 20:29
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxxxxxxxx>
Subject: Re: [WEB400] json_table(httpgetclob, nested array

First, thank you. I appreciate this. A lot. Today Booth will be
learning about "coalesce."

Nagging question: I am not seeing httpgetclob being mentioned. Why
not? Is no one using it regularly?


On 11/18/2019 11:44 AM, Tim Fathers wrote:
I've knocked up an extremely simple embedded SQL example here that might be helpfulhttps://github.com/fathert/json-rpg-example

You can deal with your issue below by coalescing away the nulls, as in my example above, or by adding null indicator fields to the fetch. If you want an example of this I can change or add this.

Tim.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&amp;data=02%7C01%7C%7C97a4f926a90a42764e0608d76d0131ca%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637097724203839378&amp;sdata=Hh2rrFGmdcceSy7FApLYQPax5oQA%2Bgu6kULCOU5sGlA%3D&amp;reserved=0
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&amp;data=02%7C01%7C%7C97a4f926a90a42764e0608d76d0131ca%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637097724203839378&amp;sdata=Q%2FHdSpI6qXwmzy47BF2SyL13Aj2w15RQaI1b2cxFmXI%3D&amp;reserved=0.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&amp;data=02%7C01%7C%7C97a4f926a90a42764e0608d76d0131ca%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637097724203849395&amp;sdata=8yx0g%2F8AsUEO3PllAOd0EHYxBoWPw6EC%2BHZviAuTMeA%3D&amp;reserved=0
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&amp;data=02%7C01%7C%7C97a4f926a90a42764e0608d76d0131ca%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637097724203849395&amp;sdata=CntSzvaMmkdo8CcOeRUMyoE7K1LU17QTfsFF6ji8Ewo%3D&amp;reserved=0.


--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&amp;data=02%7C01%7C%7C97a4f926a90a42764e0608d76d0131ca%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637097724203849395&amp;sdata=8yx0g%2F8AsUEO3PllAOd0EHYxBoWPw6EC%2BHZviAuTMeA%3D&amp;reserved=0
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&amp;data=02%7C01%7C%7C97a4f926a90a42764e0608d76d0131ca%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637097724203849395&amp;sdata=CntSzvaMmkdo8CcOeRUMyoE7K1LU17QTfsFF6ji8Ewo%3D&amp;reserved=0.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.