×
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.
Hi all
I’m try to use systools.json2bson and SYSTOOLS.HTTPGETCLOB;
I write a test pgm like this, but the sql stamen seem not working .. in my qtemp.jsondata I don’t see anything
How can I see why this don’t work ? can I see/check SQL messages ?
If some one can help me, I would be gratefull
Thanks in advance
My procs :
dcl-proc store_data ;
xSql = '
https://maps.googleapis.com/maps/api/directions/' +
'json?origin=Montreal&destination=Toronto&key=' +
‘<MYKEY>’;
exec sql
insert into qtemp.jsondata (
Select 'api_g' ,
'/tmp/',
systools.json2bson(json_info) as json_info
From (Values(SYSTOOLS.HTTPGETCLOB(
replace(trim(xSql),
' ','%20'),'')))
x(json_info) );
end-proc;
DCL-PROC Create_Temp_Table;
exec sql
CREATE OR REPLACE TABLE QTEMP.JSONDATA
( FILE_NAME VARCHAR(64) CCSID 1144 NOT NULL,
IFS_COPY_PATH VARCHAR(256) CCSID 1144 NOT NULL,
JSON_INFO BLOB(64K) NOT NULL);
exec sql
delete from qtemp.jsondata
where file_name='api_g' ;
END-PROC;
As an Amazon Associate we earn from qualifying purchases.