# Changing Data Field Type

**URL:** <https://techcommunity.softwareag.com/t/changing-data-field-type/57935>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-Basics-on-Linux-Unix-Windows, Adabas-on-Windows-UNIX, Adabas-on-Linux\
**Created:** [April 10, 2006, 8:23pm UTC](https://techcommunity.softwareag.com/t/changing-data-field-type/57935 "2006-04-10T20:23:14Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian\_Becker](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@Christian\_Becker](https://techcommunity.softwareag.com/u/Christian_Becker)\
**Post date:** [April 10, 2006, 8:23pm UTC](https://techcommunity.softwareag.com/t/changing-data-field-type/57935/1 "2006-04-10T20:23:14Z")

</div>

Hallo all!

We are using Adabas 3.1. The system is running fine, and the only thing we need to know is how to change one Data Field from Numeric to Alpha-Numeric via the Adabas command-line.

Regards,

Christian Becker

---

<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:** [April 11, 2006, 12:38am UTC](https://techcommunity.softwareag.com/t/changing-data-field-type/57935/2 "2006-04-11T00:38:16Z")

</div>

As the compression and storage is different for numeric data than alphanumeric data, you cannot just change the field format (unlike changing lengths). You will have to unload/decompress, modify fdt, compress/load to change it.

---

<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:** [April 11, 2006, 5:39pm UTC](https://techcommunity.softwareag.com/t/changing-data-field-type/57935/3 "2006-04-11T17:39:07Z")

</div>

Douglas Kelly is right!  
I would do the following steps:

1. Make a backup to be save(ADABCK)
2. Add a field with the wanted format as a new field.
3. Write a Program which copies the Data from the old field to the new field
4. Unload the file (ADAULD)
5. Decompress the file (ADADCU)
6. Delete the file
7. Create the file without the old field
8. Compress the file (ADACMP) and skip the old field
9. Load the file (ADAMUP)

Hope this helps …

---

<div class="post-metadata">

**Author:** ![Christian\_Becker](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@Christian\_Becker](https://techcommunity.softwareag.com/u/Christian_Becker)\
**Post date:** [April 12, 2006, 8:28pm UTC](https://techcommunity.softwareag.com/t/changing-data-field-type/57935/4 "2006-04-12T20:28:05Z")

</div>

Hallo,

Thank you for your help. I’m a total newbie to ADABAS and I don’t know how to Unload, Uncompress, Change FDT, Compress and Load the Field. I would appreciate if you could give me hint how the Code for this looks, or maybe you know a good source for detailed information.

Regards,

---

<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:** [April 13, 2006, 12:26pm UTC](https://techcommunity.softwareag.com/t/changing-data-field-type/57935/5 "2006-04-13T12:26:46Z")

</div>

> [@Christian Becker](#):
>
> or maybe you know a good source for detailed information.

Please have a look to the ADABAS Manual. I got the standard HTML-Manual which contains detailed descriptions for several ADABAS-Utililities (…\utils\over.htm). The names of the Utilities are always starting with ADA…  
e.g  
ADABCK → ADAbas BaCKup (Backup or Restore a Database)  
ADADBM → ADAbas DataBase Management (add fields, delete files, etc.)  
ADAFDU → ADAbas File Definition Utility (create files)  
ADAULD → ADAbas UnLoaD  
ADADCU → ADAbas DeCompression Utility(Decompress ADAULD-Output)  
ADACMP → ADAbas CoMPression (Compress ADADCU-Output)  
ADAMUP → ADAbas Mas s UPdate (Load ADACMP-Output into Database)

---

<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:** [April 14, 2006, 2:01am UTC](https://techcommunity.softwareag.com/t/changing-data-field-type/57935/6 "2006-04-14T02:01:30Z")

</div>

You can also use the DBA Workbench - select your database, double-click on it, which brings up a list of files and sets the menu bar to the File menus, which include the utilities you need to do this field format change. Start the utility and click on the Help button at the bottom of the dialog.

---

<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 15, 2006, 2:35pm UTC](https://techcommunity.softwareag.com/t/changing-data-field-type/57935/7 "2006-04-15T14:35:53Z")

</div>

In case you don’t mind a “dead” field you can just add a new one (ADADBM ADD\_FIELDS), move all data to that new field, change all references in your programs accordingly. The superflouous field can then be deleted with a scheduled reorg or the like.

---

<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:** [April 16, 2006, 1:29am UTC](https://techcommunity.softwareag.com/t/changing-data-field-type/57935/8 "2006-04-16T01:29:14Z")

</div>

Be aware that “change all references in your programs accordingly” means changing the DDM to reflect the new field name (2 character name) and re-stowing all your Natural programs that use that view/field.

---

<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:** [April 18, 2006, 12:13pm UTC](https://techcommunity.softwareag.com/t/changing-data-field-type/57935/9 "2006-04-18T12:13:38Z")

</div>

> [@Douglas Kelly](#):
>
> Be aware that “change all references in your programs accordingly” means changing the DDM to reflect the new field name (2 character name) and re-stowing all your Natural programs that use that view/field.

Plus changing all regarding arithmetic statements …

---

<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:38pm UTC](https://techcommunity.softwareag.com/t/changing-data-field-type/57935/10 "2021-04-02T14:38:57Z")

</div>


