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



Pat,

A CCSID identifies a particular variation of ASCII or EBCDIC. It's just a ID number for a particular (precise) character set.

Just like when you create a customer record in your database, you refer to it by it's customer number (or account number). IBM did the same sort of thing for character sets, they assigned a number to each one, and they refer to it by that number.

Here are a bunch of them

37 = EBCDIC for USA (and various others)
273 = EBCDIC for Germany, Austria
285 = EBCDIC for UK
297 = EBCDIC for France
(you get the idea... there are lots of EBCDICs)
437 = An old flavor of ASCII for MS-DOS in the USA
819 = ISO-8859-1, an ISO standard flavor of ASCII covering most/all
Latin-1 characters
1252 = A (more or less) superset of ISO-8859-1 used for Latin-1
ASCII Microsoft Windows.
1208 = UTF-8 Unicode
1200 = UTF-16 Unicode

You say that you are outputting 437 right now... and that may be close enough (for basic letters and numbers it'll be no problem) but certain special characters may be mistranslated. Nobody really uses 437 anymore.

I'd suggest that 1208 is probably the right CCSID for Excel. Most everything in Windows expects Unicode these days. But if you need a single-byte character set, I'd say 1252 is more likely to be correct than 437.

But, anyway... I hope you understand that CCSIDs aren't really languages, they are just specific flavors of ASCII, EBCDIC or Unicode. Just numbers to identify them.


On 5/20/2010 9:13 AM, Pat Barber wrote:
Well, after some major screwing around with various methods,
sheri sent me a link to a open source program called crtcsvf.

I downloaded that and it creates the file just fine.

Using Sheri's suggestion, I used 37 as the ccsid and did the copy
to the IFS and that created a file with a ccsid 437. I then opened
that file directly with Excel and it opened just fine. I also tried it
with Notepad and it opens it with individual records.

This entire ccsid thing is a mystery to me. I thought that was related
to different language versions of the OS.

I just don't understand the cpytoimpf and it's results.

I just ran a test using this command:

CPYTOIMPF FROMFILE(TCS/SNPREM) TOSTMF('/home/patrick/snpremtst.csv')
RCDDLM(*CRLF)

That creates a file with ccsid of 37.

That's readable using wrklnk but is complete garbage opened in WordPad.

but if I do this:

CPYTOIMPF FROMFILE(TCS/SNPREM) TOSTMF('/home/patrick/snprem437.csv')
MBROPT(*REPLACE) FROMCCSID(37) STMFCODPAG(*PCASCII) RCDDLM(*CRLF)

It is readable in WordPad and Excel and the ccsid in the IFS is 1252 ???

Is there a correct combination to use if the file is to be send to
another site ???


rob@xxxxxxxxx wrote:
You're right, you should be seeing individual records.
Try it in WordPad.

If it looks like individual records in WordPad but not in Notepad that
means you only half got the CRLF right. If it still looks like one big
stream in WordPad that means you totally blew the CRLF.


Rob Berendt



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.