Unix does not do NLS with any kind of approximation to IBM i so if you're on
an IBM i , then you need to be aware of NLS. (AKA CCSID) so that's a

Jim Oberholtzer
Agile Technology Architects

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of John Yeung
Sent: Friday, March 22, 2019 8:57 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Append to IFS File

Hopefully, there is some expert here who knows what flags to add to
the "cat" command to allow specifying the CCSID of the target file if
it doesn't already exist.

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.

John Y.
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:

This thread ...


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

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