No announcement yet.

Change CCSID on a file

  • Filter
  • Time
  • Show
Clear All
new posts

  • Change CCSID on a file

    I am copying a PF file to a special library I created. I then need to get the file changed from CCSID 65535 to CCSID 37. So I run CHGPF CCSID(37) on the file. Of the 8,000 files I have to do, only a few refuse to change. No views over the file, and no error occurs, but it doesn't change.
    My need is to add this file to MS SQL Server, and it does, but of course then any query sees it as hex. Any suggestions on how to fix the CCSID issue and/or any tricks in MS SQL on how I can handle this?

  • #2
    when you create the the table (aka "file") assign CCSIDs to the individual columns (aka "fields")


    • #3
      Thanks for the response. Its a pain (lots of columns) but hopefully not many tables. What command would I use to assign a CCSID to a column? QCMD or SQL ?


      • #4
        Generally, I would assign them when creating the file, they'd be part of the SQL DDL or DDS that the file is created from.

        You should also be able to do it after the fact with SQL using ALTER TABLE -- but I don't think I've ever needed to try it.