|
Hi Vern,
> Or use the CPY command to make a copy and change the CCSID in the
> process. The second method can be automated, for sure. But maybe the
> first one can, as well. I've not investigated QShell commands that could
> change the CCSID - maybe "touch" can do it.
If the assumption is that the CCSID on the file is wrong, you can use one
of the following commands to change it to a correct one. It's important
to understand that these just change the CCSID attribute of the file, they
do not do any translation of the data from one CCSID to another.
>From the OS/400 command line:
CHGATR OBJ('/path/to/myfile') ATR(*CCSID) VALUE(37)
>From QShell:
setccsid 37 /path/to/myfile
If you do want to do translation of the data, for example if you know that
the data is ASCII and you want to translate it to EBCDIC:
>From the command line:
CPY OBJ('/path/to/myfile') TOOBJ('/path/to/newfile') FROMCCSID(850)
TOCCSID(37) DTAFMT(*TEXT)
>From QShell:
iconv -f 850 -t 37 /path/to/myfile > /path/to/newfile
setccsid 37 /path/to/newfile
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.