I try to make a JSON_OBJECT in my SQLRPGLE Program. But even the simplest doesnt work:
**FREE
ctl-opt dftactgrp(*no) actgrp(*caller);
dcl-s PAYLOAD varchar(1000);
EXEC SQL
SELECT CAST(
JSON_OBJECT(
'Test' value 'hello'
) AS CLOB(1000000))
INTO :PAYLOAD
FROM SYSIBM.SYSDUMMY1;
*inlr = *on;
return;
I always get SQLSTATE 57017 and SQLCODE -332. Character conversion is not defined. The Machine is a 7.3 and my job ccsid is 1141. I also tried to make the payload as an sqltype:
dcl-s PAYLOAD SQLTYPE(CLOB:1000000) CCSID(1208) INZ;
but nothing works. Does anyone have a solution? Thanks.