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



Start with small steps by running the select statement interactively.

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of john art
Sent: Thursday, 23 November 2017 12:09 PM
To: midrange-l@xxxxxxxxxxxx
Subject: [IE] Help with SYSTOOLS.HTTPGETCLOB and systools.json2bson

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;


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD

############################################################## This correspondence is for the named person's use only. It may contain confidential or legally privileged information, or both. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this correspondence in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or rely on any part of this correspondence if you are not the intended recipient. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Equifax. If you need assistance, please contact Equifax :- Australia www.equifax.com.au/contact New Zealand www.equifax.co.nz/contact ##############################################################

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.