-
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.
-
JSON ist aber per Definition immer UTF-8, das wäre CCSID 1208. Geht die?
-
Zitat von AG1965_2
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.
-
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)
Similar Threads
-
By -Totti in forum IBM i Hauptforum
Antworten: 5
Letzter Beitrag: 25-05-18, 19:21
-
By dschroeder in forum NEWSboard Programmierung
Antworten: 20
Letzter Beitrag: 05-12-17, 12:38
-
By tarkusch in forum NEWSboard Programmierung
Antworten: 2
Letzter Beitrag: 05-05-14, 07:57
-
By harbir in forum NEWSboard Programmierung
Antworten: 1
Letzter Beitrag: 31-10-13, 18:10
-
By CMueller@must.de in forum NEWSboard Windows
Antworten: 0
Letzter Beitrag: 01-10-01, 09:00
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- You may not post attachments
- You may not edit your posts
-
Foren-Regeln
|
Erweiterte Foren Suche
Google Foren Suche
Forum & Artikel Update eMail
AS/400 / IBM i
Server Expert Gruppen
Unternehmens IT
|
Kategorien online Artikel
- Big Data, Analytics, BI, MIS
- Cloud, Social Media, Devices
- DMS, Archivierung, Druck
- ERP + Add-ons, Business Software
- Hochverfügbarkeit
- Human Resources, Personal
- IBM Announcements
- IT-Karikaturen
- Leitartikel
- Load`n`go
- Messen, Veranstaltungen
- NEWSolutions Dossiers
- Programmierung
- Security
- Software Development + Change Mgmt.
- Solutions & Provider
- Speicher – Storage
- Strategische Berichte
- Systemmanagement
- Tools, Hot-Tips
Auf dem Laufenden bleiben
|
Bookmarks