Skip to Content
author's profile photo Former Member
Former Member

ASCII/UTF-8 with open dataset

Hi Folks,

I have one program which writes a file in file share. But sometimes this files creating as ASCII and sometimes UTF-8, even though the code pointing to normal ASCII file.

So is there any way to differentiate the file format with OPEN DATA SET statement? And do you have any thoughts on this like when it will create ASCII/UTF-8?

OPEN DATASET GV_FILENAME FOR APPENDING
          IN LEGACY TEXT MODE CODE PAGE GV_CODEPAGE MESSAGE GV_MSG
          REPLACEMENT CHARACTER GV_REPLCHAR
          IGNORING CONVERSION ERRORS
          FILTER GV_FILTER.

If you have any thoughts please share with me.

Regards,

Raghu.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Apr 07, 2011 at 05:17 AM

    Hello Raghu,

    But sometimes this files creating as ASCII and sometimes UTF-8, even though the code pointing to normal ASCII file.

    Why are you using the LEGACY TEXT MODE option? LEGACY option should be used if there is a non-UC system involved.

    If you specify ENCODING DEFAULT, then the encoding would be UTF-8. Read the F1 documentation on OPEN DATASET for further details.

    BR,

    Suhas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2011 at 01:42 AM

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.