‎2012 Feb 22 2:33 PM
Hello all,
I have some problem with the below statements. Please help me.
PARAMETERS: P_FILE(100) TYPE C LOWER CASE. "input file ( this is of text file .txt)
DATA: LV_FILE(200) TYPE C.
DATA: LV_STRING(2055) TYPE C.
LV_FILE = P_FILE. "Input File
OPEN DATASET LV_FILE FOR INPUT IN TEXT MODE MESSAGE LV_DS_MSG ENCODING DEFAULT WITH SMART LINEFEED.
READ DATASET LV_FILE INTO LV_STRING.
After, READ DATASET statement program is going for short dump. saying some character conversion issue.
Please help me.
Regards,
Venkat
‎2012 Feb 22 3:03 PM
Hi ,
try changing the ENCODING to NON-UNICODE and check.
Some character in your file has some problem with the UNICODE conversion, either you can change the READ dataset statement as below.
OPEN DATASET LV_FILE FOR INPUT IN TEXT MODE MESSAGE LV_DS_MSG ENCODING NON-UNICODE WITH SMART LINEFEED.This will not convert the characters to UNICODE format
OR
OPEN DATASET LV_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS WITH SMART LINEFEED.
This will make sure it is in UNICODE format but will ignore the conversion errors.
Hope this helps.
Regards,
Praveenkumar T.
‎2012 Feb 22 3:03 PM
Hi ,
try changing the ENCODING to NON-UNICODE and check.
Some character in your file has some problem with the UNICODE conversion, either you can change the READ dataset statement as below.
OPEN DATASET LV_FILE FOR INPUT IN TEXT MODE MESSAGE LV_DS_MSG ENCODING NON-UNICODE WITH SMART LINEFEED.This will not convert the characters to UNICODE format
OR
OPEN DATASET LV_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS WITH SMART LINEFEED.
This will make sure it is in UNICODE format but will ignore the conversion errors.
Hope this helps.
Regards,
Praveenkumar T.
‎2012 Feb 23 3:02 PM
Hi all,
Thanks for giving valuable input . it's working fine now.
Regards,
Venkat
‎2012 Feb 22 3:14 PM
Hi,
I don't think there is nothing wrong with your statement. Just check the input file content.
If you want to by pass this error use IGNORING CONVERSION ERRORS to your OPEN DATASET statement.
Regards,
Aravind.
‎2012 Feb 22 4:09 PM
Hi
I think you are facing special char issue.
check this link to deal with this
‎2012 Feb 22 5:57 PM
What is Encoding?
<< Moderator message - Cut and paste response from a blocked site removed and points unassigned. Plagiarism is not allowed in SCN >>
Edited by: Rob Burbank on Feb 22, 2012 1:08 PM