ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

What purpose does job CCSID have?

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

  • What purpose does job CCSID have?

    So I was experimenting with the new (ish - new to me) IBM HTTP APIs - e.g. SQL function HTTPPOSTCLOB() for posting a CLOB over HTTP and getting the result into a CLOB. I could not get it to work, I kept getting errors about it not being possible to convert between CCSID 65565 and 1200.

    After some googling I found it was because my job CCSID was 65535, which these APIs do not allow. Changing my job CCSID to 37 allowed it to work.

    But that means if we wanted to use this function in an actual production program, the job it runs under would need to be CCSID 37, whereas all our production system jobs (batch jobs and user jobs) are currently all 65535.

    So I am wondering, what does the job CCSID actually do, and what would be the potential implications of changing a job to run as CCSID 37 instead of 65535?

  • #2
    Your system should be set to the correct CCSID via system value QCCSID. Search midrange.com - there are reports that changing the value mid-day on production systems had no ill effect...

    Cheers,

    Emmanuel

    Comment


    • #3
      We had a CCSID issue recently where someone defined a field in a work file as #£DATE; this caused users with a CSSID of *SYSVAL (65535) to go into MSGW with a decimal data error, whereas users with CCSID 285 were fine.

      The #£DATE field was populated by #$DATE from the LDA - containing today's date in yyyymmdd format, after the operation #£DATE contained a hex value of 0000000, in STRSQL it showed as ++++++++ (invalid)

      So it seems it could affect currency symbols, if you use them.

      Comment


      • #4
        Not just currency symbols... there are lots of characters (symbols, international characters, etc) that have different code points in different CCSIDs. You may know that your data was all originally encoded in CCSID 285 (or whatever it happened to be) but if your system was configured with a bogus CCSID like 65535, the system doesn't know that.

        When you say "my data is CCSID 65535" you are saying "my data isn't text, it is binary data that should never be translated". If you view it on a terminal that's configured for 285 it may look like different data than a terminal thats configured for (for example) 37... or 500... or whatever it happens to be.

        All of this mess was created because people used 65535 in the first place, so nothing was properly identified.

        As Emmanuel points out, if you did things properly under 65535, then when you change it to the right CCSID, everything will work perfectly. If, however, you misencoded something, characters will be mistranslated.

        Comment

        Working...
        X