ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Files code page

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

  • Files code page

    Hi, I've just installed Eclipse with cobol plugin to compile COBOL programs, just for learning.
    I have a program with reading files and writing to files and I can't handle problems with code page, I see only weird characterrs... What type of files should I create? .txt or .dat? And how to change code page to use ASCII or some other windows codepage? Because right now everythings is using EBCDIC I guess. Thanks for help.

  • #2
    Re: Files code page

    I've not used RDi etc so can't really help in that regard though I would have thought the software would have performed code page conversion fine.
    Originally posted by michal2442
    What type of files should I create? .txt or .dat?
    I'm always surprised when I see this sort of thing. ".txt", ".dat" etc etc extensions are just labels, nothing more. Antiquated operating systems like windows use these as a rather silly way of working out what type of file it is so it knows what application to use to open it with. That's all these file extensions are good for, they don't magically transform the file into something special so a program can read them.

    Comment


    • #3
      Re: Files code page

      This isn't an issue with RDi to IBM i - how are you trying to use it?

      Comment


      • #4
        Re: Files code page

        What COBOL compiler are you using? It almost seems that this forum (Code400) isn't the best one for your questions, though it might be fine.

        When you say that you "installed Eclipse with cobol plugin", do you mean you only downloaded and installed Eclipse by itself and then a COBOL plugin? Or have you actually installed something like RDi that is built on an Eclipse platform?
        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


        • #5
          Re: Files code page

          Originally posted by tomliotta View Post
          What COBOL compiler are you using? It almost seems that this forum (Code400) isn't the best one for your questions, though it might be fine.

          When you say that you "installed Eclipse with cobol plugin", do you mean you only downloaded and installed Eclipse by itself and then a COBOL plugin? Or have you actually installed something like RDi that is built on an Eclipse platform?

          I've downloaded compiler for Java from eclipse free site and then added plugin with COBOL compiler - Elastic COBOL.
          So I'm not using RDz, I try to learn COBOL at home.

          Comment


          • #6
            Re: Files code page

            Ouch. I don't know anything about the Elastic COBOL project. The only chance that you might have for help (that I can find) seems to be the Forums/Community/General Help site. It doesn't look like there is much traffic there.

            You're the only person that I know of who's used Elastic COBOL, so I guess you're the expert. If you can't answer your question, it's not clear who can.
            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


            • #7
              Re: Files code page

              Since this is a PC based product there shouldn't be an issue with EBCDIC - that's only an issue if you're connecting to an IBM mainframe or i platform. In regards to extension I'd guess something like .CBL - but the documentation for the Elastic product should indicate what it expects.

              Comment


              • #8
                Re: Files code page

                I didn't understand that the problem was with the compiler reading COBOL source. I thought that the problem was with a compiled (Elastic) COBOL program trying to read and write streamfiles. Some clarification by the OP could be helpful.

                Also, where are the files read from or written to? Is all work done on a PC? Or are the files in a shared drive from IBM i (or a mainframe)? Getting the right encoding might involve knowing how the file objects are created, though the encoding attribute can possibly be changed.
                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

                Working...
                X