# Does natural support to store special characters

**URL:** <https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-Code-Samples\
**Created:** [July 26, 2017, 12:34pm UTC](https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774 "2017-07-26T12:34:00Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karthik\_G4](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/karthik_g4/32/21634_2.png) [@Karthik\_G4](https://techcommunity.softwareag.com/u/Karthik_G4)\
**Post date:** [July 26, 2017, 12:34pm UTC](https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774/1 "2017-07-26T12:34:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [July 26, 2017, 12:40pm UTC](https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774/2 "2017-07-26T12:40:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Karthik\_G4](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/karthik_g4/32/21634_2.png) [@Karthik\_G4](https://techcommunity.softwareag.com/u/Karthik_G4)\
**Post date:** [July 26, 2017, 12:46pm UTC](https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774/3 "2017-07-26T12:46:20Z")

</div>

> [@Wolfgang Winter](#):
>
> 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?

---

<div class="post-metadata">

**Author:** ![Karthik\_G4](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/karthik_g4/32/21634_2.png) [@Karthik\_G4](https://techcommunity.softwareag.com/u/Karthik_G4)\
**Post date:** [July 26, 2017, 1:11pm UTC](https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774/4 "2017-07-26T13:11:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [July 26, 2017, 2:20pm UTC](https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774/5 "2017-07-26T14:20:25Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Karthik\_G4](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/karthik_g4/32/21634_2.png) [@Karthik\_G4](https://techcommunity.softwareag.com/u/Karthik_G4)\
**Post date:** [July 26, 2017, 3:12pm UTC](https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774/6 "2017-07-26T15:12:46Z")

</div>

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](https://techcommunity.softwareag.com/uploads/short-url/sRam9e9Ar8XLDAXi2OOGKBpiqql.docx) (12.8 KB)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [July 26, 2017, 3:37pm UTC](https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774/7 "2017-07-26T15:37:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [July 26, 2017, 6:42pm UTC](https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774/8 "2017-07-26T18:42:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Karthik\_G4](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/karthik_g4/32/21634_2.png) [@Karthik\_G4](https://techcommunity.softwareag.com/u/Karthik_G4)\
**Post date:** [July 27, 2017, 11:41am UTC](https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774/9 "2017-07-27T11:41:30Z")

</div>

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](https://global.discourse-cdn.com/techcommunity/original/2X/4/4a6714817d0324725965fb88d2e8c360e61b8c96.jpeg)

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [July 27, 2017, 5:20pm UTC](https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774/10 "2017-07-27T17:20:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [July 28, 2017, 3:28am UTC](https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774/11 "2017-07-28T03:28:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Karthik\_G4](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/karthik_g4/32/21634_2.png) [@Karthik\_G4](https://techcommunity.softwareag.com/u/Karthik_G4)\
**Post date:** [August 1, 2017, 2:45pm UTC](https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774/12 "2017-08-01T14:45:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:39pm UTC](https://techcommunity.softwareag.com/t/does-natural-support-to-store-special-characters/195774/13 "2021-04-02T15:39:00Z")

</div>


