# Export all FDTs

**URL:** <https://techcommunity.softwareag.com/t/export-all-fdts/75101>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-Basics-on-Linux-Unix-Windows, Adabas-on-Windows-UNIX, Adabas-on-Linux\
**Created:** [July 26, 2007, 4:32pm UTC](https://techcommunity.softwareag.com/t/export-all-fdts/75101 "2007-07-26T16:32:43Z")\
**Posts on this page:** 5\
**Page:** 1

<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:** [July 26, 2007, 4:32pm UTC](https://techcommunity.softwareag.com/t/export-all-fdts/75101/1 "2007-07-26T16:32:43Z")

</div>

Hello all!

Is there any possibility to export all FDTs of a specific Database?  
The only way I know is:

```auto
adarep db=01 fdt file=* > allmyfdt.txt
```

ADADCU also does an fdt-output, but this is not what I’m searching for. Is there a way to export it in FDUFDT-Format (=the format which is used for adafdu)?

BTW: We’re using ADABAS 5.1.4 on Solaris

Regards,

Matthias

---

<div class="post-metadata">

**Author:** ![Heiko\_Kaffenberger](https://avatars.discourse-cdn.com/v4/letter/h/c0e974/32.png) [@Heiko\_Kaffenberger](https://techcommunity.softwareag.com/u/Heiko_Kaffenberger)\
**Post date:** [August 2, 2007, 1:18pm UTC](https://techcommunity.softwareag.com/t/export-all-fdts/75101/2 "2007-08-02T13:18:44Z")

</div>

Hello,

The best way to do this is:

adauld db=224 file=11 numrec=1  
adadcu dcufdt

and then you get a DCUFDT file.

And this file could be used as FDUFDT for adafdu!

Regards  
Heiko

---

<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:** [August 8, 2007, 3:08pm UTC](https://techcommunity.softwareag.com/t/export-all-fdts/75101/3 "2007-08-08T15:08:19Z")

</div>

> [@Heiko Kaffenberger](#):
>
> adauld db=224 file=11 numrec=1  
> adadcu dcufdt

Thanks! It also works, if the file is empty. But the disadvantage is that I could only do this for one specific file. I want to do it for the whole database. OK, it seems that I have to do some shell-scripting …

---

<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:** [August 20, 2007, 11:41am UTC](https://techcommunity.softwareag.com/t/export-all-fdts/75101/4 "2007-08-20T11:41:47Z")

</div>

> [@Matthias](#):
>
> OK, it seems that I have to do some shell-scripting …

Here it is (quick and dirty):

```auto
#!/usr/bin/bash

db=22

ULDDTA=/tmp/ULDDTA.$$
DCUFDT=/tmp/DCUFDT.$$
DCUDTA=$ULDDTA
DCUOUT=/dev/null
export ULDDTA DCUFDT DCUDTA DCUOUT

adarep db=$db cont | tail +9 | awk '{if($1==""){exit}printf "%03d\n",$1}' |
while read file
do
  if ["$file" -ge 10] # skip system files, see adarep ... sum
  then
    adauld db=$db file=$file numrec=1 short && adadcu dcufdt || exit 1
    mv $DCUFDT $HOME/fdt.db${db}.file${file} || exit 2
    rm -f $ULDDTA
    ### exit # for testing
  fi
done
```

Tested with Adabas 5.1.4 on Solaris 10

Any improvements?

---

<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:48pm UTC](https://techcommunity.softwareag.com/t/export-all-fdts/75101/5 "2021-04-02T14:48:35Z")

</div>


