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

Generating Unicode Files

Former Member
0 Likes
608

Does anyone know how to create a unicode file using PL/SQL? I must generate labels and not all the locations are on SAP. So I download a file from SAP (4.7 non-unicode) and need to send only certain records to a vendor in China.

Thanks in advance

5 REPLIES 5
Read only

christian_wohlfahrt
Active Contributor
0 Likes
588

Hi Colleen!

To create files on application servers, you can use the statements open dataset / transfer / close dataset.

In your case this could look like:

OPEN DATASET file FOR OUTPUT IN TEXT MODE ENCODING UTF-8. 
TRANSFER `1234567890` TO file. 
CLOSE DATASET file.

Regards,

Christian

Read only

0 Likes
588

Hi Christian,

Do you know if with PL SQL I can generate a unicode file?

Thanks!

Read only

0 Likes
588

What is PL/SQL? For me SQL spells standard query language and just helps to get data - up to here no data (file) output is defined.

Read only

0 Likes
588

I need to do is send that file from Unix to file server. It appears that the file is being corrupted. The trademark and register symbols is being converted.

Read only

0 Likes
588

Hi Colleen!

Glad to hear, you solved already most parts.

Let's go into details:

- Are you sure, your file displayer is handling UTF-8 correctly?

- Are files on application server (Unix) and file server identical (not only total size, but every byte)?

- Is UTF-8 correct codepage, or do you need a different codepage version?

I don't believe there is a problem with the UTF-8 codepage itself, but if you just have problems with two characters: you might replace them with substitution values in file preparation.

Regards,

Christian