|
Hi, Scott
Later Vern
At 12:43 AM 6/25/2004, you wrote:
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
-- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
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.