codefori / codefori/vscode-ibmi-debug-issues

Problem while working with CCSID 1208 / UTF-8

Open
#17 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

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
```

![grafik](https://github.com/codefori/vscode-ibmi-debug-issues/assets/161619756/5e9ecc50-0196-48b4-9620-7159a8b4fbfe)

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.

![grafik](https://github.com/codefori/vscode-ibmi-debug-issues/assets/161619756/3fd66d8f-ae3e-4aac-81c1-930bc61f4aec)

This is the result of the databank after the programm call.
![grafik](https://github.com/codefori/vscode-ibmi-debug-issues/assets/161619756/002d785f-89c0-4a6e-ac87-c6513a382139)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.