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

CONVT_CODEPAGE Dump - REPLACE....REGEX..

Former Member
0 Likes
1,314

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

4 REPLIES 4
Read only

retired_member
Product and Topic Expert
Product and Topic Expert
0 Likes
1,047

Hmm,

why don't you simply use the additions IGNORING CONVERSION ERRORS or REPLACEMENT CHARACTER in OPEN DATASET?

Horst

Read only

0 Likes
1,047

Thanks Horst. Let me try adding IGNORING CONVERSION ERRORS in OPEN DATASET.

Regards,

Sowmya

Read only

0 Likes
1,047

Hi Horst,

Hope it doesn't impact if there's conversion error.

-Sowmya

Read only

0 Likes
1,047

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?