× 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.



I'm trying to get the below to work on my IBM i.
When I run in ACS run sql scripts I get the error that systools.httpgetclob
is not found but this is false because I see it in qsys2.sysroutines and I
have other similar web services like this working on my ibm i, but to other
domains of course.

If you just call the url in a browser (or in postman) it will even pull
back the correct json response (though json response reports an error
because I'm not sharing my api key)... but still a result set in json
should be returned.

{"error": 101,"next_draw": "","currency": "","jackpot": ""}

Can anyone explain why this is happening?
The api documentation is here...
https://www.magayo.com/lottery-docs/api/get-next-jackpot/


select error
,next_draw
,currency
,jackpot

from json_table(
systools.httpgetclob(
'https://www.magayo.com/api/jackpot.php?api_key=xxx&game=us_powerball'
),

'$'
columns
(error float path '$.error'
,next_draw char(10) path '$.next_draw'
,currency char(3) path '$.currency'
,jackpot char(15) path '$.jackpot')

error on error
) as x;

tia jay

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.