Application Development and Automation 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: 
Read only

ECC 6.0 Dataset Encoding

Former Member
0 Likes
971

Hi,

My company is upgrading the system from 46c to ECC 6 and some program encounter problem during the upgrade:

In "TEXT MODE" the "ENCODING" addition must be specified.

Currently, the program is using the following syntax TO READ A PLAIN TEXT FILE:

OPEN DATASET 'filename' FOR INPUT IN TEXT MODE.

Which encoding should i use in ECC 6??

OPEN DATASET 'filename' IN TEXT MODE for INPUT ENCODING NON-UNICODE.

OPEN DATASET 'filename' IN TEXT MODE for INPUT ENCODING DEFAULT.

OPEN DATASET 'filename' IN TEXT MODE for INPUT ENCODING UTF-8.

Regards,

Kit

1 ACCEPTED SOLUTION
Read only

former_member416498
Active Participant
0 Likes
829

Hi Kit

Its better to specify the UTF-8 encoding. So that the characters in the file are handled according to the Unicode character representation( UTF-8).

Though Unicode system, the designation DEFAULT corresponds to the designation UTF-8. It would be better if you can mention what error you are facing while upgrading.

Regards

Vijay

5 REPLIES 5
Read only

former_member416498
Active Participant
0 Likes
830

Hi Kit

Its better to specify the UTF-8 encoding. So that the characters in the file are handled according to the Unicode character representation( UTF-8).

Though Unicode system, the designation DEFAULT corresponds to the designation UTF-8. It would be better if you can mention what error you are facing while upgrading.

Regards

Vijay

Read only

0 Likes
829

Hi Vijay,

Thx for your reply. I want to make the question simpler. In case, i read a plain text file(ASCII) in ecc 6 by the open dataset statement. Which encoding option should i use?? UTF-8,DEFAULT or NON-UNICODE ??

Regards,

Kit

Read only

0 Likes
829

Hi Kit,

Refer to the help.sap,com link [link|http://help.sap.com/saphelp_47x200/helpdata/en/79/c554dcb3dc11d5993800508b6b8b11/frameset.htm] which clearly confirm that you must use UTF-8.

The textual storage in UTF-8 format ensures that the created files are platform-independent

Replace


open dataset DSN in text mode.

with


open dataset DSN in text mode for input encoding utf-8.

Cheers,

Aditya

Read only

0 Likes
829

Hi Aditya,

Thx for your reference link. It seems that the "in legacy text mode for input" should be used in my case. Because all the content in the file are normal character. Besides, i also want to retain the original file format. Any comment?

Regards,

Kit

Read only

0 Likes
829

Hi,

I am only concerned about data loss if you are working on a unicode system considering the disclaimer mentioned by SAP here

"However, be aware that data loss and conversion errors can occur in Unicode systems if there are characters in the structure that cannot be represented in the non-Unicode codepage"

Hence, I would recommend use UTF-8 and if there are issues, revert to legacy mode.

It's always better to be fully compliant with Unicode.

Cheers,

Aditya