Does natural support to store special characters

Hi,

Im trying to store some special characters,
???š???ž???€???Š??Ž?

however i wasnt able to.

Ex if i store ’ Laž? ’ i could see its only accepting ’ La ’ is being stored.

This is required to store words of different languages.
Could you please help me to know how could i store the special character and retrive them as it is from Adabas.

Thank you

When using fields of data type A(lpha) you are likely to see special characters being translated away,
consider using U(nicode) instead - on both the Natural and Adabas side of things.

Thanks for your prompt response,

i have a constraint that not to touch the adabas,
Any other alternative so that to type cast, convert, or edit mask it to U format?

i tired some small piece of code

DEFINE DATA LOCAL
01 #ALPHA (A20) INIT <‘???ž???’>
01 #UTF (U20)
END-DEFINE
MOVE #ALPHA TO #UTF
WRITE #UTF
END

Got the below error
nat error 3411

ICU (International Components for Unicode) is the engine to support
code pages and Unicode in Natural.
Code pages are defined in ICU in a data file that is linked to the
nucleus or loaded dynamically. If the code page is not available,
it is not part of the data file used.

For whatever the information is worth to you, on my PC Natural, your program works fine

DEFINE DATA LOCAL
01 #ALPHA (A20) INIT <‘???ž???’>
01 #UTF (U20)
END-DEFINE
*
MOVE #ALPHA TO #UTF
WRITE #UTF
END
Page 1 17-07-26 08:16:53

???ž???

So perhaps unicode is not accessible on your system? or disabled?

Thank you Steve for testing it.

I’m developing a Code where different users would update the data with special characters attached in the comment,
So if this is a environment or system related this may not work for different user(As Unicode may be enabled in some and may not be in some other systems).

Is it related to Natural/Adabas Version ?
Also does Adabas stores any set of characters may be special or regional based characters?

Could you please suggest some ways to store these type special characters

Special characters.docx (12.8 KB)

Adabas stores what it receives, even for format A fields, but Natural most likely translates away “unprintable” characters.

Karthik;

As Wolfgang mentioned, it is likely the special characters are there (in Adabas), but are simply not printing out in Natural.

Read in an A20 field from the database; then WRITE ‘=’ #ALPHA #ALPHA (EM=H(20))

I would be willing to wager the #ALPHA without the Hex edit mask does not have the special characters, whereas with the Hex edit mask you will see the appropriate characters.

What is it you have to do with special characters in your Natural program?

Thanks for your suggestion Wolfgang and Steve,

I have attached the screen of what we are trying to store it on Adabas.
The description we type in with special character/language, the highlighted yellow color text is not getting stored.
and also some characters which i have attached in my previous comments.
This is required as an when we display the word with those missing letter would make no sense.

Description.jpg

Let’s try to isolate where the problem is.

Is there a Natural INPUT program that the text is being entered into?

If so, please look at a WRITE statement using a Hex edit mask. This will tell us if the characters are being read by Natural into a local variable, say #TEXT.

Then, if they are there in #TEXT, MOVE #TEXT to an field in a VIEW and then issue an UPDATE.

Next, have a view like

1 MYVIEW VIEW of…
2 TEXT (A20)
2 REDEFINE TEXT
3 #TEXTB (B20)

Next, take a look at #TEXTB. If the characters are there, we know Adabas has the correct string.

Next, do a WRITE #TEXTB #TEXTB (em=h(20))

If we see the characters in the edit mask, but not see them without the edit mask, we know Natural, as configured, is not recognizing the characters, and hence ignoring them.

Next, try MOVE #TEXTB TO #TEXTU where #TEXTU is unicode.

Now WRITE #TEXTU with and without edit mask.

Report back how far you get successfully.

You may need to enable Natural’s ICU support. You can try this out with dynamic parameters:
CFICU=ON,CP=IBM00852
where IBM00852 (which supports Hungarian mainframe characters) will need to be replaced with whatever the code page is that supports your characters on your host machine.

Thank you Steve for your suggestion, i have tried moving the values as suggested and found that they are visible in either formats,
While i try moving to UTF format it shows the same old ICU support error.

I even doubt on the front end where data is being sent to MF, we use Java services to post the data to MF.
Checking with webMethods and WSDL files where it might support the character set to push to Mainframe.

Thanks you Douglas, im checking with my DBA team if they could enable the IBM00852 character set, so that few of the special lang Characters will be accepted and stored.