× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 2019-03-22 9:57 AM, John Yeung wrote:
...
I'm no expert, but my mindset is: If I'm going to be using Unix-style
commands, I'm going to think in a Unix style. And Unix doesn't have
anything corresponding to CCSID, so I'm not going to expect that from
a Unix command. CCSID is an IBM i concept, so I'm going to use an IBM
i command to set the CCSID as needed. For this purpose, I use CHGATR.
(And note that if I'm going whole-hog for the Unix style by logging in
via SSH, and working with the files using only Unix-style tools, it
really doesn't matter what the CCSID is anyway.)

The other approach I've seen is to always ensure that the target file
already exists and has the right CCSID beforehand. I think `touch` is
the QSH command of choice for that purpose.


CHGATR wouldn't work after using 'cat' since data-loss would have already occurred. But it should work to use 'touch' to create the file, CHGATR to set the CCSID, then 'cat'.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.