I am inserting a web service response (UTF-8) into a table with a CLOB column defined like so (IBM i 6.1)....
cacheData CLOB (10 M) CCSID 1208 Not Null
Here is basically the code.
P InsertResponseToCacheTable... P B Export D InsertResponseToCacheTable... D pi 10i 0 D response@ * Value D responseLen 10i 0 Value D cacheData s SQLTYPE(CLOB:10485760) /Free cacheData_Len = responseLen; cacheData_Data = %Str(response@:responseLen); Exec SQL Insert Into CacheTable Values(:cacheData); /End-Free P InsertResponseToCacheTable... P E
It appears to work fine. I can insert the entry into the table and fetch it from the table; it is still valid xml when I perform the fetch with embedded SQL from RPG. My problem is, when I use iNavigator's "Run SQL Scripts" the data appears as gibberish. Is this the correct behavior? I thought I would be able to see it using the "Run SQL Scripts" interface. I'm worried tha since I can't view it, something is horribly wrong and even though it appears to be working there is something lurking that will cause a major issue down the road.
Thanks fof any help. Zach