# CHAR() function

**URL:** <https://techcommunity.softwareag.com/t/char-function/61956>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [February 14, 2007, 2:43pm UTC](https://techcommunity.softwareag.com/t/char-function/61956 "2007-02-14T14:43:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Earkkai](https://avatars.discourse-cdn.com/v4/letter/e/4bbf92/32.png) [@Earkkai](https://techcommunity.softwareag.com/u/Earkkai)\
**Post date:** [February 14, 2007, 2:43pm UTC](https://techcommunity.softwareag.com/t/char-function/61956/1 "2007-02-14T14:43:13Z")

</div>

Is there a CHAR() function in Natural? I am of the impression that this function to return the character value of numeric variable. Quick reply to this will be greatly appreciated. Right now, I don’t have access to Natural Development Environment so couldn’t try it out myself

---

<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:** [February 14, 2007, 6:41pm UTC](https://techcommunity.softwareag.com/t/char-function/61956/2 "2007-02-14T18:41:34Z")

</div>

No such function.

However: MOVE #NUMERIC TO #ALPHA is valid (okay, it is not a function)

The converse, by the way does exist; namely COMPUTE #NUMERIC = VAL (#ALPHA)

steve

---

<div class="post-metadata">

**Author:** ![Matthias1](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Matthias1](https://techcommunity.softwareag.com/u/Matthias1)\
**Post date:** [February 14, 2007, 7:29pm UTC](https://techcommunity.softwareag.com/t/char-function/61956/3 "2007-02-14T19:29:46Z")

</div>

> [@Steve Robinson](#):
>
> However: MOVE #NUMERIC TO #ALPHA is valid (okay, it is not a function)

I guess Earkkai is talking about a function like

```auto
#a1 := Char(78)
```

and #a1 contains “+” (EBCDIC) or “N” (ASCII) afterwards.

The only way I know is to use a redefinition:

```auto
define data local
01 #a1 (a1)
01 redefine #a1
02 #b1 (B1)
end-define
#b1 := 78
write #a1
end
```

---

<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, 2:41pm UTC](https://techcommunity.softwareag.com/t/char-function/61956/4 "2021-04-02T14:41:04Z")

</div>


