Export all FDTs

Hello all!

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

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

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

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 …

Here it is (quick and dirty):

#!/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?