-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hi,
our company is currently looking for options to implement UTF-8 in our system.
I wrote a test program to check how it is possible to work with UTF-8.
H DFTACTGRP(*NO)
H OPTION(*NODEBUGIO:*SRCSTMT:*SHOWCPY)
H CCSIDCVT(*LIST: *EXCP)
H OPENOPT(*NOCVTDATA)
H CCSID(*EXACT)
H CCSID(*CHAR: *UTF8)
//ctl-opt charcounttypes(*utf8) charcount(*natural);
*----------------------------------------------------------------*
* PROGRAMMNAME: HOWTO_UTF8 *
* AUTOR : *
* SCHREIBDATUM: 16.04.2024 *
* VERSION : STANDARD *
* *
* DIESES FORMAT HAT FOLGENDE FUNKTIONEN: *
* Test UTF-8 Verarbeitung *
*----------------------------------------------------------------*
FKFZ01PF UF A E K DISK
D
D DSKFZ1 E DS EXTNAME('KFZ01PF': *all)
D QUALIFIED
D CCSID(*EXACT)
D KEYKFC DS LIKEREC(RKFZ01PF: *key)
D CCSID(*EXACT)
C EVAL KEYKFC.FA4 = 'KONZ'
C EVAL KEYKFC.KFFA = 1
C EVAL KEYKFC.KFSM01 = 1
chain(e) %kds(KEYKFC) KFZ01PF DSKFZ1;
if %found(KFZ01PF);
DSKFZ1.KFBEZ2 = %trim(DSKFZ1.KFBEZ2) + %char('$U':*utf8);
update(e) RKFZ01PF DSKFZ1;
endif;
C MOVE *ON *INLR
The code above was a working solution i came up with.
The field "KFBEZ2" ist defined with ccsid(1208). The other fields are usually in ccsid(1141).
I am now wondering why the values in the debugger don't show readable values in my data structure "DSKFZ1".
It actually works if i remove the "QUALIFIED" tag from my data structure but it needs to qualified to work in our system.
Metadata
Metadata
Assignees
Labels
No labels


