× 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.



Hi Chuck

I agree with your suggestions - trouble is, the scenario doesn't match their use. The files are being saved, perhaps, from Notepad, and we don't know which encoding the user chooses.

Or the files come as attachments to an email and are saved to a file share on the IFS.

CHGATR would work if we knew what the content encoding was. But some of these can be little-endian, so have to be converted anyhow - hence, Bruce' suggestion of that transform API.

i don't think we have good enough control of these files' encoding in order to limit the options. I'm going to work on something to determine what the encoding is from the contents - sort of like you said for graphic files, right? Another thread!

I appreciate the thoughts - it is always good to throw ideas around until the solution finds its merry way into my brain.

Cheers
Vern

On 3/1/2013 4:00 PM, CRPence wrote:
On 01 Mar 2013 13:09, Vernon Hamberg wrote:
These files are coming from a windows system, and they are usually
tagged with CCSID=1252.
Since CCSID(1252) is not UTF-16, that would be a problem.

I hoped that if I specified 1200 as the
FROMCCSID, that the file's CCSID would be ignored.
Assuming this specific thing has not changed since v5r3 [and docs
seems to suggest no change]:

The FROMCCSID() for CPYFRMIMPF is used to identify the CCSID of the
FROMFILE(); i.e. for a [program-described] database file as from-file.
The FROMCCSID parameter is even conditioned with prompt control, to
ensure that the parameter is not even visible unless a value has been
specified for the FROMFILE.

The CCSID for the FROMSTMF is always the CCSID of the STMF. Thus if
the stream files are improperly tagged, then improper effects are to be
expected. To correct the CCSID tagging, use the following request:
CHGATR OBJ(the_file) ATR(*CCSID) VALUE(1200)

FWiW: I often get the incorrect CCSID tagging on my STMF when I FTP
the data from a client; having forgotten to issue the following FTP
subcommand before the PUT subcommand:
QUOTE TYPE C 1200



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.