× 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, Scott

Thanks for hopping on this train. Yeah, I'd assumed the CCSID was wrong. That is why I suggested the use of F15 when displaying the file.

To add to your comments, the CCSID tells the system how to present the data, the underlying bytes do not change.

There are some sanity checks I use. One is, if I see a whole bunch of @-signs, it is likely to be EBCDIC but set to an ASCII CCSID (850 or 1252, etc.), since x40 is a blank in EBCDIC and the @-sign in ASCII. And if there seem to be a lot of accented characters, it is likely to be ASCII but set to an EBCDIC CCSID, since the regular alphabetic character are around x40-x7f and that is where EBCDIC (CCSID 37) puts the accented characters. ASCII numbers will usually come out blank in an EBCDIC CCSID, since they are control codes in EBCDIC (display attributes - but suppressed when using opt 5 in WRKLNK).

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

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.