ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CCSID txt file IFS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CCSID txt file IFS

    Hi folks, give me please the hint for my issue.. what must be the CCSID for a streamfile which supposed to be text file on the other system where it is pushed from IFS of AS400?
    briefly we have a DB2 file with *HEX ccsid which is copied into IFS as streamfile with CCSID = 37
    this is transferred under sftp to unix side and here it looks something like this:

    ÔÙÅÃÉÄkÔÆÉÙÔkÔÖÆÆÉÃkÔÁÃÃãkÔ Áãè×ÅkÔÙÙkÔÃäÙÃÄkÔÄÓÁÃãkÔ×

    Do I have to put another CCSID for the streamfile? instead of 37? is about only some text data inside this DB2 file, only regular characters, nothing special, no CLOB or BLOB or other extra special stuff.
    many thanks!

  • #2
    It all depends. For example on my US-English Windows 7, if I create a text file on a NetServer share it has a CCSID of 1252.

    Comment


    • jtaylor___
      jtaylor___ commented
      Editing a comment
      You can't just arbitrarily change the CCSID. The CCSID set on the file must match how the data in actually encoded.

  • #3
    You don't say how you are copying the file so it is hard to make a recommendation. One thing is sure - code page 37 is EBCDIC and Unix boxes no comprende. You need to ask what format they want it in. These days code page 1208 (which is UTF-8) is usually a pretty good choice for moving files cross platform.

    However, given that the table has a page of *Hex there may be other problems. That value says there is no code page associated with the data - it is just binary (or hex if you prefer) values. So I'm not sure that you can get any automatic conversions. You really need to get rid of *Hex - it is a really bad idea. If you want to look up the issues and solutions then search for code page (or csid) 65535. I don't recall anybody ever calling it *Hex.

    Comment


    • #4
      If you are copying to the IFS, under CPYTOIMPF, press F9 and you'll see FROMCCSID and TOCCSID.

      If you are using FTP to or from IBM i, you need to set it as text in your session. Do so with either the BINARY or ASCII commands in your FTP session, depending on which you need.

      Comment


      • #5
        You could use wxhexeditor to try viewing it in other code pages. Its an easy way to change your view of the data

        Comment

        Working...
        X