# ADABAS field with default Alfanumeric value

**URL:** <https://techcommunity.softwareag.com/t/adabas-field-with-default-alfanumeric-value/282495>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Mainframes\
**Created:** [August 23, 2023, 9:55pm UTC](https://techcommunity.softwareag.com/t/adabas-field-with-default-alfanumeric-value/282495 "2023-08-23T21:55:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomas\_Moraes](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/tomas_moraes/32/6982_2.png) [@Tomas\_Moraes](https://techcommunity.softwareag.com/u/Tomas_Moraes)\
**Post date:** [August 23, 2023, 9:55pm UTC](https://techcommunity.softwareag.com/t/adabas-field-with-default-alfanumeric-value/282495/1 "2023-08-23T21:55:07Z")

</div>

#### _ **Product/components** used and **version/fix** level:_

ADABAS

#### _Detailed explanation of the problem:_

Hello, I appreciate some explanation about one curiosity related to STORE command.

In Oracle we have this feature below. Is there something similar in ADABAS? ( not system fields )  
**Oracle Default Value**  
A column can be given a default value using the DEFAULT keyword.  
The DEFAULT keyword provides a default value to a column when the Oracle INSERT INTO statement does not provide a specific value.  
The default value can be **literal value, an expression,** or a SQL Function, such as SYSDATE.

```auto
CREATE TABLE demo_tbl (
    salary number(8,2) DEFAULT 9500,
    hire_date DATE DEFAULT '01-JAN-2011' ,
    birthdate DATE DEFAULT SYSDATE
)

```

---

<div class="post-metadata">

**Author:** ![Tomas\_Moraes](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/tomas_moraes/32/6982_2.png) [@Tomas\_Moraes](https://techcommunity.softwareag.com/u/Tomas_Moraes)\
**Post date:** [August 25, 2023, 9:41pm UTC](https://techcommunity.softwareag.com/t/adabas-field-with-default-alfanumeric-value/282495/2 "2023-08-25T21:41:47Z")

</div>

In my current case I´d like to set an initial value for a control field IN-STATUS ,  
but I´m also considering to ignore this and consider that the first status is ’ ’ (blank), but I wonder if it is a good practice.

---

<div class="post-metadata">

**Author:** ![wolfgang.winter](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/wolfgang.winter/32/17954_2.png) [@wolfgang.winter](https://techcommunity.softwareag.com/u/wolfgang.winter)\
**Post date:** [August 28, 2023, 6:17am UTC](https://techcommunity.softwareag.com/t/adabas-field-with-default-alfanumeric-value/282495/3 "2023-08-28T06:17:10Z")

</div>

There is no ADABAS equivalent of the SQL DEFAULT, as close as you can come would be using an [Adabas Trigger](https://documentation.softwareag.com/adabas/ada854mfr/triggers/trgsover.htm) to set a default when storing a new record.

---

<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:** [February 24, 2024, 6:17am UTC](https://techcommunity.softwareag.com/t/adabas-field-with-default-alfanumeric-value/282495/4 "2024-02-24T06:17:33Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
