Topic
  • 2 replies
  • Latest Post - ‏2012-06-20T18:14:35Z by ZachJ
ZachJ
ZachJ
15 Posts

Pinned topic CLOB with CCSID 1208

‏2012-06-15T14:03:14Z |
I posted this to the RPG Cafe; I didn't get any responses so I thought I'd try here.

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
Updated on 2012-06-20T18:14:35Z at 2012-06-20T18:14:35Z by ZachJ
  • krmilligan
    krmilligan
    450 Posts

    Re: CLOB with CCSID 1208

    ‏2012-06-18T18:39:11Z  
    This doesn't seem quite correct to me either.

    Are you current in terms of 6.1 Database Group PTF and the IBM i Access client service pack?
  • ZachJ
    ZachJ
    15 Posts

    Re: CLOB with CCSID 1208

    ‏2012-06-20T18:14:35Z  
    This doesn't seem quite correct to me either.

    Are you current in terms of 6.1 Database Group PTF and the IBM i Access client service pack?
    I got an answer on this over on the RPG Cafe that makes sense.

    RPG Cafe Response