Replies: 2 comments
-
Hello, I'm trying to get my company to switch to VS Code, but I’m running into this problem and can’t figure out how to fix it. I’d really appreciate any help. Thanks! (and thanks as well for the extension) |
Beta Was this translation helpful? Give feedback.
0 replies
-
I converted this to a discussion since this is not a Code for IBM i issue, but a configuration issue on the system you're using. To me, it seems like this issue might reside in the SSHD. See the potential fix here and read more about CCSIDs and how Code for IBM i work here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I’m experiencing an issue with the Code for IBM i extension when executing go to file.
It works and open files, but when i type '' it gives this error. (for example: msc/qdds/)
The file has CCSID 280.
My job is set to CCSID 280.
The sysval is 65535.
If I run the same query directly in a 5250 job, it works correctly and returns valid results:
SELECT
CAST(SYSTEM_TABLE_MEMBER AS CHAR(10) FOR BIT DATA) AS SYSTEM_TABLE_MEMBER,
IFNULL(PARTITION_TEXT, '') AS PARTITION_TEXT,
IFNULL(SOURCE_TYPE, '') AS SOURCE_TYPE
FROM QSYS2.SYSPARTITIONSTAT
WHERE SYSTEM_TABLE_SCHEMA = 'MSC'
AND SYSTEM_TABLE_NAME = 'QDDS'
ORDER BY 1;
However, when executing go to file with '*'
/home/MSC/.vscode/cqsh_1 -c "system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')""
Call QSYS2.QCMDEXC('CHGJOB CCSID(280)');
select cast( SYSTEM_TABLE_MEMBER as char( 10 ) for bit data ) as SYSTEM_TABLE_MEMBER
, ifnull( PARTITION_TEXT, '' ) as PARTITION_TEXT
, ifnull( SOURCE_TYPE, '' ) as SOURCE_TYPE
from QSYS2.SYSPARTITIONSTAT
where SYSTEM_TABLE_SCHEMA = 'MSC'
and SYSTEM_TABLE_NAME = 'QDDS'
order by 1;
I get the following error:
SQL0332: Character conversion between CCSID 1200 and CCSID 65535 is not valid
CPFA0A9: Object not found. The object is EN_US.UTF-8.
CPD4318: Derived operands are not valid for the IFNULL operator. Reason code 12.
CPC2206: The property of object QZSHSYSTEM in QTEMP of type *USRSPC has been changed.
It looks like a CCSID conversion issue, also the char '�' is printed as it is and it should be 'è'.
Here the complete error in my language (it):
Call QSYS2.QCMDEXC('CHGJOB CCSID(280)');
select cast( SYSTEM_TABLE_MEMBER as char( 10 ) for bit data ) as SYSTEM_TABLE_MEMBER , ifnull( PARTITION_TEXT, '' ) as PARTITION_TEXT , ifnull( SOURCE_TYPE, '' ) as SOURCE_TYPE from QSYS2.SYSPARTITIONSTAT where SYSTEM_TABLE_SCHEMA = 'MSC' and SYSTEM_TABLE_NAME = 'QDDS' order by 1
{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\n\n **** CLI ERROR *****\n SQLSTATE: 57017\nNATIVE ERROR CODE: -332\nConversione carattere tra CCSID 1200 e CCSID 65535 non valida.",
"stderr": "CPFA0A9: L'oggetto non � stato trovato. L'oggetto � EN_US.UTF-8.\nCPD4318: Gli operandi derivati non sono validi per l'operatore IFNULL. Codice causa 12.\nSQL0332: Conversione carattere tra CCSID 1200 e CCSID 65535 non valida.\nCPC2206: � stata modificata la propriet� dell'oggetto QZSHSYSTEM in QTEMP di tipo *USRSPC."
Beta Was this translation helpful? Give feedback.
All reactions