ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CPYSPLF and DCBS

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

  • CPYSPLF and DCBS

    I am trying to copy a spool file to a DB file and I get an error that says
    TOFILE parameter must be a double-byte character set (DBCS) file

    What's up with that and how to correct

  • #2
    Re: CPYSPLF and DCBS

    Is the spooled file a DBCS spooled file? If so, it makes sense that the PF would have to be one, too.

    How do you correct? Create a DBCS physical file, of course! Find out how the data in the spooled file is encoded, and create the PF with the same encoding {CCSID).

    Comment


    • #3
      Re: CPYSPLF and DCBS

      When I look at the spool file attributes of the spool file, all I see is DBCS = *YES and DBCS extension characters = *YES. I don't see any CCSID for the spool file. The PF that I am copying the splf to has CCSID = 65535 DBCS capable = N. I don't see a way on the CRTPF command to make the PF DBCS = Y. I noticed that the job log of the job that created the SPLF specified CCSID(65535).

      Comment


      • #4
        Re: CPYSPLF and DCBS

        65535 isn't a real CCSID. It just means HEX, in other words, the data should not be automatically converted between CCSIDs because the data is non-text. (Which is obviously not true, here.) I wonder why the spooled file is DBCS to begin with if you're not even using CCSIDs?

        To enable DBCS you'll need to create a file with a field that supports double-byte characters. For example:
        Code:
        Create Table your-lib/test (
           Field1 graphic(132) ccsid 1200
        )
        This creates a file with a double-byte unicode field. This should be DBCS capable...

        Comment


        • #5
          Re: CPYSPLF and DCBS

          Thanks for the info, i'll try it.

          I wonder why the spooled file is DBCS to begin with if you're not even using CCSIDs?
          I'm not really sure why, the spool file was created by a software package we bought.

          Comment

          Working...
          X