[NEWSboard IBMi Forum]
Seite 2 von 2 Erste 1 2
  1. #13
    Registriert seit
    Jan 2012
    Beiträge
    1.102
    Das Weglassen von ccsid(1200) geht leider doch nicht. Ich bekomme folgenden Fehler bei Kompilieren:

    json_clobDS_data = %trim(json_in);
    RNF0659: Implizite Zeichenfolgeumsetzung wird für Operand JSON_CLOBDS ... mit CCSID *GRAPH: *IGNORE nicht unterstützt.

    Liegt möglicherweise an unseren Compileoptionen. Aber kein Problem. Dann schreibe ich ccsid(1200) halt explizit dran.

  2. #14
    Registriert seit
    Oct 2013
    Beiträge
    171
    JSON ist aber per Definition immer UTF-8, das wäre CCSID 1208. Geht die?

  3. #15
    Registriert seit
    Jan 2012
    Beiträge
    1.102
    Zitat Zitat von AG1965_2 Beitrag anzeigen
    JSON ist aber per Definition immer UTF-8, das wäre CCSID 1208. Geht die?
    Nein.

    Code:
    dcl-s json_clobDS sqltype(dbclob:200000) ccsid(1208);
         SQL5067  ID des codierten Zeichensatzes (CCSID) 1208 ist für JSON_CLOBDS nicht gültig.

  4. #16
    Registriert seit
    Feb 2001
    Beiträge
    20.202
    Du musst die CCSID für GRAPH in der H-Zeile definieren:

    CCSID(*GRAPH : parameter | *UCS2 : number | *CHAR :
    *JOBRUN)
    CCSID(*GRAPH) and CCSID(*UCS2) set the default graphic (*GRAPH) and UCS-2
    (*UCS2) CCSIDs for the module. These defaults are used for literals, compile-time
    data, program-described input and output fields, and data definitions that do not
    have the CCSID keyword coded.
    CCSID(*CHAR) sets the CCSID used for the module’s character data at runtime.
    CCSID(*GRAPH : *IGNORE | *SRC | number)
    Sets the default graphic CCSID for the module. The possible values are:
    *IGNORE
    This is the default. No conversions are allowed between graphic and
    UCS-2 fields in the module. The %GRAPH built-in function cannot be
    used.
    *SRC
    The graphic CCSID associated with the CCSID of the source file will be
    used.
    number
    A graphic CCSID. A valid graphic CCSID is 65535 or a CCSID with the
    EBCDIC double-byte encoding scheme (X’1200’).
    CCSID(*UCS2 : number)
    Sets the default UCS-2 CCSID for the module. If this keyword is not
    specified, the default UCS-2 CCSID is 13488.
    number must be a UCS-2 CCSID. A valid UCS-2 CCSID has the UCS-2
    encoding scheme (x’7200’). For example, the UTF-16 CCSID 1200 has
    encoding scheme x’7200’.
    If CCSID(*GRAPH : *SRC) or CCSID(*GRAPH : number) is specified:
    v Graphic and UCS-2 fields in externally-described data structures will use the
    CCSID in the external file.
    v Program-described graphic or UCS-2 fields will default to the graphic or UCS-2
    CCSID of the module, respectively. This specification can be overridden by using
    the CCSID(number) keyword on the definition of the field. (See “CCSID(number
    | *DFT)” on page 325.)
    v Program-described graphic or UCS-2 input and output fields and keys are
    assumed to have the module’s default CCSID.
    CCSID(*CHAR : *JOBRUN)
    When CCSID(*CHAR:*JOBRUN) is specified, character data will be
    assumed to be in the job CCSID at runtime. The character X’0E’ will be
    assumed to be a shift-out character only if the runtime job CCSID is a
    mixed-byte CCSID.
    Control-Specification Keywords
    260 ILE RPG Reference
    |
    |
    #
    #
    #
    When CCSID(*CHAR : *JOBRUN) is not specified, character data will be
    assumed to be in the mixed-byte CCSID related to the job CCSID. If the
    character X’0E’ appears in character data, it will be interpreted as a
    shift-out character. This may cause incorrect results when character data is
    converted to UCS-2 data.
    Note: Specifying CCSID(*CHAR:*JOBRUN) does not change the behaviour
    of the compiler with respect to character literals containing X’0E’.
    When a character literal contains X’0E’, the compiler will always
    treat it as a shift-out character, independent of the CCSID(*CHAR)
    keyword

    Also
    H CCSID(*GRAPH:1200)

    Dann sollte der DBCLOB mit 1200 definiert werden.
    Zusätzlich musst du das Ergebnis des HTTP-Requests, das ja vom Typ CLOB ist, in DBCLOB umwandeln:
    cast(http..... as DBCLOB(1000000, 1208))
    oder
    DBCLOB(http....., 1000000, 1208)
    Dienstleistungen? Die gibt es hier: http://www.fuerchau.de
    Das Excel-AddIn: https://www.ftsolutions.de/index.php/downloads
    BI? Da war doch noch was: http://www.ftsolutions.de

Similar Threads

  1. PGU - mehrere Datenbanken verwenden
    By -Totti in forum IBM i Hauptforum
    Antworten: 5
    Letzter Beitrag: 25-05-18, 20:21
  2. SQL-UDTF mit dynamischem SQL
    By dschroeder in forum NEWSboard Programmierung
    Antworten: 20
    Letzter Beitrag: 05-12-17, 13:38
  3. DSPSIZ Beide Formate verwenden
    By tarkusch in forum NEWSboard Programmierung
    Antworten: 2
    Letzter Beitrag: 05-05-14, 08:57
  4. BINCHAR - wie kann ich das Feld verwenden?
    By harbir in forum NEWSboard Programmierung
    Antworten: 1
    Letzter Beitrag: 31-10-13, 19:10
  5. WinWord für AS/400 verwenden
    By CMueller@must.de in forum NEWSboard Windows
    Antworten: 0
    Letzter Beitrag: 01-10-01, 10:00

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • You may not post attachments
  • You may not edit your posts
  •