Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
date: Thu, 26 Feb 2026 08:40:50 +0100--
from: "Birgitta Hauser" <Hauser@xxxxxxxxxxxxxxx>
subject: RE: CCSID - RPG issues
Without having seen your program and H- and D-Specifications for
defining your data structures ... it is hard to say what happened.
... but per default is everything converted into the Job CCSID, so the
Hex-Value in your program (CCSID 37) can differ from the hex-Value in
your file (CCSID 1208)
In RPG when using native I/O in a cyclic Main procedure without output
into a data structure, RPG generates automatically I/O Buffer (but the
character data are converted into JOBCCSID).
If you want to avoid this, you have to read your data into a data
structure, but you have to suppress any conversion.
This can be done by adding the Keyword DATA(*NOCVT) to the file in the
F-Specs and CCSID(*EXACT) to the Data structure Definition.
With DATA(*NOCVT) are the file data is not converted when reading the
data With CCSID(*EXACT) the (unconverted) read data is moved
unconverted into the data structure.
Example:
DCL-F MyFile Keyed Data(*NoCvt);
DCL-DS OutputDS ExtName('MYFILE': *ALL) CCSID(*EXACT) END-DS;
Mit freundlichen Gr??en / Best regards
Birgitta Hauser
Modernization ? Education ? Consulting on IBM i Database and Software
Architect IBM Champion since 2020
------------------------------
date: Thu, 26 Feb 2026 09:15:36 +0000 (UTC)
from: cesco via RPG400-L <rpg400-l@xxxxxxxxxxxxxxxxxx>
subject: Re: CCSID - RPG issues
Impossible to know without a minimally reproducible example.Your hex
dump are a mix of french ccsid ebcdic and utf8.I personally just use
UTF16 in files , put H CCSID(*UCS2:*UTF16) in the header , varucs2 for
any internal var and all works idiomatically even in stock native io
without any? other particular provisions.
ciau
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.