Hallo Zusammen.
Für einen Webservice soll eine Adresse eingelesen und verarbeitet werden.
Leider funktioniert das Ganze nicht wie gewünscht.

dcl-s
dcl-s tmpAddress1 VARCHAR(150);
dcl-s tmpAddress2 VARCHAR(150);

tmpAddress1 ='Schmalholzstraße 27, 86916 Kaufering';
EXEC SQL values systools.urlencode(:tmpAddress1,'UTF-8') INTO :tmpAddress2;

Damit soll dann die Google- API aufgerufen werden:

EXEC SQL DECLARE CUR01 SCROLL CURSOR FOR
select *
from XMLTABLE ('$d/GeocodeResponse/result/geometry/location'
passing xmlparse(document(
systools.httpgetclob(
'https://maps.googleapis.com/maps/api/geocode/xml?key=' concat
'GOOGLEKEY&address=' concat
:tmpAddress2 concat
'&components=countryE','' ))) as "d"
COLUMNS
lat decimal(15, 7) PATH 'lat',
lng decimal(15, 7) PATH 'lng'
) ;


EXEC SQL OPEN CUR01;
EXEC SQL FETCH FIRST FROM CUR01 INTO :tmpLat, :tmpLng ;
EXEC SQL CLOSE CUR01;

DSPLY (%char(tmpLat));


Was mache ich falsch ?

Gruß