Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting default format of the file

Former Member
0 Kudos

Hi Guys,

I am writing a file using OPEN DATASET with following command:-

OPEN DATASET outfile FOR OUTPUT IN TEXT MODE

ENCODING UTF-8 IGNORING CONVERSION ERRORS.

Even though I am forcing the encoding to UTF-8 , the output file comes out in IS0-8859(Western European Format).

I have found a way to forcefully make the file by doing some coding changes. But this will require me to modify all the programs with my changes.

When I was searching for solution last time, I read about the system parameter which determines the format of the file which is written by OPEN DATASET OUTPUT statement.

But I am unable to find the same. If you know the way to set the parameter which governs the default encoding kindly let me know

Thanks for your help

Regards

Prashant

4 REPLIES 4

Sandra_Rossi
Active Contributor
0 Kudos

UTF8 and ISO8859 are rather the same. You can see in http://en.wikipedia.org/wiki/ISO_8859 that "The first 256 characters in Unicode and the UCS are identical to those in ISO/IEC-8859-1."

What is really the problem?

Former Member
0 Kudos

HI Sandra,

Thanks for the response.

These outtbound files generated from SAP are transferred to various other systems. These systems expect them is one format. Either UTF-8 or Western.

But I am getting the format of the output file different, depending on whether the data has Unicode character such as EURO symbol in it

Thanks again

Prashant

0 Kudos

On my system, it works. I transfer only euro character, and I get a file with this hex content which is UTF-8 : E2 82 AC 20 (first 3 bytes are the euro character, the last is the line termination).

Could you try on your system?

Former Member
0 Kudos

try:

OPEN DATASET outfile FOR OUTPUT IN TEXT MODE

ENCODING NON-UNICODE