ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CCSID Problem

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

  • CCSID Problem

    Hi Guys, I'm facing a problem here regarding CCSID. I'm trying to ftp a physical file from AS400 to my PC, however, i failed to obtain the 'yuan' currency symbol in the .txt file as displayed in the As400. Can anyone guide me through this? What should i do?

  • #2
    Re: CCSID Problem

    I think by default, FTP will try to find an ASCII code page that supports the same characters as the EBCDIC CCSID of your PF. Maybe there isn't a matching ASCII CCSID? Or maybe the PF is using 65535, so it doesn't know the proper CCSID?

    Can you tell us more about the CCSID of the data you're transferring?

    Have you tried converting the file ahead of time (such as with CPYTOIMPF or CPYTOSTMF) and using FTP in binary mode? That way you have more control over the conversion.

    Comment


    • #3
      Re: CCSID Problem

      Thanks for replying to my thread.. The pf is using ccsid 935. And in the ftp script, i insert a subcommand 'Ltype C 1381'. The result is not as what i needed, i'm trying to change 1381 to 1388.Do you think i shud remove the subcommand? I Can't convert the file as you have suggested as this is also part of the requirement.. But if you have any links to guide me on that, it would be great. I dont always use Cpytoimpf or cpytostmf..

      As of now, i just insert this into the ftp script.

      Ltype c 1381
      Put qtemp/fileA fileA.txt

      Comment


      • #4
        Re: CCSID Problem

        Unfortunately, I am not familiar with Chinese character sets, as I do not work in that part of the world.

        It seems strange to me that you use LTYPE C 1381 (or 1388) if your file is 935?? Shouldn't you use LTYPE C 935?

        Also, LTYPE only lets the local CCSID. What are you using for the remote CCSID?

        Comment


        • #5
          Re: CCSID Problem

          Originally posted by charlestchan View Post
          The pf is using ccsid 935. And in the ftp script, i insert a subcommand 'Ltype C 1381'. The result is not as what i needed, i'm trying to change 1381 to 1388.
          I don't quite understand. If the PF is 935 and you need 1388, why did you use 1381? I'm far from being an expert in this particular area, so understanding the process might be helpful.

          I Can't convert the file as you have suggested as this is also part of the requirement.
          That's not clear at all. How did you get a requirement that tells you not to use a suggestion from Scott? ( ) Or does it mean that you have a requirement that only FTP is to be used directly from a temporary table (i.e., in QTEMP)?
          Tom

          There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

          Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

          Comment


          • #6
            Re: CCSID Problem

            Hi tom, yes, you can assume that i have such requirement to only ftp from qtemp. The physical file has 935 as CCSID, and i found out that changing the ftp client ccsid by using the subcommand 'Ltype C 1388' doesn't help, in fact, the result was worse.

            I'm thinking that the user profile ccsid could be the reason of this problem, as it's using sysval of 655535.

            Comment


            • #7
              Re: CCSID Problem

              Click image for larger version

Name:	pic5.PNG
Views:	1
Size:	6.2 KB
ID:	126821

              Picture 1

              Click image for larger version

Name:	pic4.PNG
Views:	1
Size:	24.1 KB
ID:	126822

              Picture 2


              Click image for larger version

Name:	pic2.PNG
Views:	1
Size:	19.3 KB
ID:	126823

              Picture 3

              Click image for larger version

Name:	pic3.PNG
Views:	1
Size:	37.5 KB
ID:	126824

              Picture 4

              Picture 1 shows my PF CCSID which is 935, and picture 2 shows my FTP script. Picture 3 shows the report that is being copied to the PF using CPYSPLF. Picture 4 shows the FTP result in my pc. I hope someone good in CCSID can tell me how to deal with such situation, is it the AS400 problem or my computer problem?

              Comment

              Working...
              X