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

Open Dataset

Former Member
0 Likes
711

Dear all,

There seems to be a problem in

OPEN DATASET lfile IN TEXT MODE ENCODING DEFAULT FOR INPUT WITH SMART LINEFEED.

The above code works fine on OS400 operating system but when we execute the

same report on AIX platform the code is not getting executed. sy-subrc is returning the value 8.

Do we need to change the code for AIX.

with rgds

Ranjith Singh

5 REPLIES 5
Read only

Former Member
0 Likes
678

Hi,

Code looks fine to me.

Check the file. If it at all exists or not. File path and name is case sensitive.

If you are getting any runtime error please let me know.

Regards,

R

Read only

0 Likes
678

Hi,

     The file exists on the application server , while debugging i could see that the correct file is picked.

     There is no Dump.

   I am facing this problem in AIX

Read only

0 Likes
678

Hi,

Can you please check what is the Encoding format?

The class CL_ABAP_FILE_UTILITIES contains the method CHECK_UTF8 for determining whether a file is a UTF-8 file.

 

  • A UTF-16 file can only be opened as a binary file.

Regards,

R

Read only

Former Member
0 Likes
678

hello,

You should always use text mode if you want to write strings to files or where you know that an existing file has a line construction.

can you check the structure of the file.

Regards,

Read only

Former Member
0 Likes
678

Hi

  Try to catch the error ass following

DATA mess TYPE string.

OPEN DATASET lfile IN TEXT MODE

    ENCODING DEFAULT

    FOR INPUT

    WITH SMART LINEFEED

  MESSAGE mess.

Regrards