2016 Aug 26 1:14 PM
Hi Experts,
We're getting CONVT_CODEPAGE Dump (from code page '4103' to code page '1100')
Screenshot below:
It is occurring in the below code:
REPLACE ALL OCCURRENCES OF REGEX '[^[:print:]] '
IN int_records-line WITH space.
TRANSFER int_records-line TO g_fileo.
Can somebody please suggest me what other REGEX do we need to add to overcome this error?
Thanks & Regards,
Sowmya
2016 Aug 26 2:03 PM
Hmm,
why don't you simply use the additions IGNORING CONVERSION ERRORS or REPLACEMENT CHARACTER in OPEN DATASET?
Horst
2016 Aug 26 3:24 PM
Thanks Horst. Let me try adding IGNORING CONVERSION ERRORS in OPEN DATASET.
Regards,
Sowmya
2016 Aug 29 5:39 AM
Hi Horst,
Hope it doesn't impact if there's conversion error.
-Sowmya
2016 Aug 29 6:52 AM
What do you mean with that?
Your question was about handling conversion errors in TRANSFER, wasn't it?
IGNORING CONVERSION ERRORS in OPEN DATASET is doing what it says. Each non-convertible character is replaced in the conversion either by the character "#" or by the character defined by the addition REPLACEMENT CHARACTER. In order to get the behavior you seem to have intented with your above code, you use
IGNORING CONVERSION ERRORS REPLACEMENT CHARACTER ` `.
PS:
In your above REPLACE statement, you use
... WITH space.
BEHIND WITH the trailing blank is removed and the replacement character is an empty string. Is that what you have intented?