#!/bin/sh
set -u
#######################################################################
#                  zdbinfx.ins                                        #
#######################################################################
informix_manifests()
{
#############################################
# Sun4 Informix Manifest listing
#############################################
sun4_nfx500=" ${DBI_SASPATH}/obj/viventry.o \
    ${DBI_SASPATH}/obj/vivc.o             \
    ${DBI_SASPATH}/obj/MCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/PCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/nfxsql.o           \
    ${DBI_SASPATH}/obj/inftbl.o           \
    ${DBI_SASPATH}/obj/vipkludg.o         \
    ${DBI_SASPATH}/olb/wxfer.a            \
    ${dbmshome}/lib/esql/libsql.a         \
    ${dbmshome}/lib/esql/libgen.a         \
    ${dbmshome}/lib/esql/libos.a          \
    ${DBI_SASPATH}/olb/xvxfer.a "

sun4_nfx500_b4="ld -o ${DBI_DEST_DIR}/sasexe/dbi/sasnfx \
                   -r -p -d -dc -X "
sun4_nfx500_af="-lm /usr/lib/libc.a"

# Informix Version 6.00
sun4_nfx600=" ${DBI_SASPATH}/obj/viventry.o \
    ${DBI_SASPATH}/obj/vivc.o             \
    ${DBI_SASPATH}/obj/MCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/PCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/nfxsql.o           \
    ${DBI_SASPATH}/obj/inftbl.o           \
    ${DBI_SASPATH}/obj/vipkludg.o         \
    ${DBI_SASPATH}/olb/wxfer.a            \
    ${dbmshome}/lib/esql/libsql.a         \
    ${dbmshome}/lib/libasf.a              \
    ${dbmshome}/lib/netlib.a              \
    ${dbmshome}/lib/esql/libgen.a         \
    ${dbmshome}/lib/esql/libos.a          \
    ${dbmshome}/lib/nettlistub.a          \
    ${DBI_SASPATH}/olb/xvxfer.a "

sun4_nfx600_b4="ld -o ${DBI_DEST_DIR}/sasexe/dbi/sasnfx \
                   -r -p -d -dc -X "
sun4_nfx600_af="-lm /usr/lib/libc.a"



#############################################
# Sol2 Informix Manifest listing
#############################################
sol2_nfx500=" ${DBI_SASPATH}/obj/MCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/PCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/nfxsql.o           \
    ${DBI_SASPATH}/obj/inftbl.o           \
    ${DBI_SASPATH}/obj/vipkludg.o         \
    ${DBI_SASPATH}/olb/wxfer.a            \
    ${DBI_SASPATH}/obj/__fstd.o           \
    ${dbmshome}/lib/esql/libsql.a         \
    ${dbmshome}/lib/esql/libgen.a         \
    ${dbmshome}/lib/esql/libos.a          \
    ${DBI_SASPATH}/olb/vxfer.a "

sol2_nfx500_b4="ld -o ${DBI_DEST_DIR}/sasexe/dbi/sasnfx \
                   -B static -r -dn"
sol2_nfx500_af="-lm /usr/ucblib/libucb.a"

# Informix Version 6.00
sol2_nfx600=" ${DBI_SASPATH}/obj/MCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/PCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/nfxsql.o           \
    ${DBI_SASPATH}/obj/inftbl.o           \
    ${DBI_SASPATH}/obj/vipkludg.o         \
    ${DBI_SASPATH}/olb/wxfer.a            \
    ${DBI_SASPATH}/obj/__fstd.o           \
    ${dbmshome}/lib/esql/libsql.a         \
    ${dbmshome}/lib/esql/libos.a          \
    ${dbmshome}/lib/libasf.a              \
    ${dbmshome}/lib/netlib.a              \
    ${dbmshome}/lib/esql/libgen.a         \
    ${dbmshome}/lib/esql/libos.a          \
    ${dbmshome}/lib/esql/libgen.a         \
    ${dbmshome}/lib/libasf.a              \
    ${DBI_SASPATH}/olb/vxfer.a "

sol2_nfx600_b4="ld -o  ${DBI_DEST_DIR}/sasexe/dbi/sasnfx \
                   -B static -r -dn"
sol2_nfx600_af=" -L /usr/lib \
                 -lnsl -lsocket -lm \
                 -lintl /usr/ucblib/libucb.a"

# Informix Version 7.10
sol2_nfx710=" ${DBI_SASPATH}/obj/MCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/PCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/nfxsql.o           \
    ${DBI_SASPATH}/obj/inftbl.o           \
    ${DBI_SASPATH}/obj/vipkludg.o         \
    ${DBI_SASPATH}/olb/wxfer.a            \
    ${DBI_SASPATH}/obj/__fstd.o           \
    ${dbmshome}/lib/esql/libsql.a         \
    ${dbmshome}/lib/esql/libos.a          \
    ${dbmshome}/lib/libasf.a              \
    ${dbmshome}/lib/netlib.a              \
    ${dbmshome}/lib/esql/libgen.a         \
    ${dbmshome}/lib/esql/libos.a          \
    ${dbmshome}/lib/esql/libgen.a         \
    ${dbmshome}/lib/libasf.a              \
    ${DBI_SASPATH}/olb/vxfer.a "

sol2_nfx710_b4="ld -o ${DBI_DEST_DIR}/sasexe/dbi/sasnfx \
                   -B static -r -dn"
sol2_nfx710_af=" -L /usr/lib \
                 -lsocket -lnsl -lm \
                 -lintl /usr/ucblib/libucb.a"



#############################################
# HP Informix Manifest listing
#############################################
hp_nfx500=" ${DBI_SASPATH}/obj/crt.o      \
    ${DBI_SASPATH}/obj/vipkludg.o         \
    ${DBI_SASPATH}/obj/dyncall.o          \
    ${DBI_SASPATH}/obj/MCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/PCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/nfxsql.o           \
    ${DBI_SASPATH}/obj/inftbl.o           \
    ${DBI_SASPATH}/olb/wxfer.a            \
    ${dbmshome}/lib/esql/libsql.a         \
    ${dbmshome}/lib/esql/libgen.a         \
    ${dbmshome}/lib/esql/libos.a          \
    ${DBI_SASPATH}/olb/vxfer.a "

hp_nfx500_b4="ld -o ${DBI_DEST_DIR}/sasexe/dbi/sasnfx \
                 -e mcn_main "
hp_nfx500_af=" -R80000 -HF -N -a archive -lm -lc"

# Informix Version 6.00
hp_nfx600=" ${DBI_SASPATH}/obj/crt.o      \
    ${DBI_SASPATH}/obj/vipkludg.o         \
    ${DBI_SASPATH}/obj/dyncall.o          \
    ${DBI_SASPATH}/obj/MCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/PCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/nfxsql.o           \
    ${DBI_SASPATH}/obj/inftbl.o           \
    ${DBI_SASPATH}/olb/wxfer.a            \
    ${dbmshome}/lib/esql/libsql.a         \
    ${dbmshome}/lib/libasf.a              \
    ${dbmshome}/lib/netlib.a              \
    ${dbmshome}/lib/esql/libgen.a         \
    ${dbmshome}/lib/esql/libos.a          \
    ${dbmshome}/lib/nettlistub.a          \
    ${DBI_SASPATH}/olb/vxfer.a "

hp_nfx600_b4="ld -o ${DBI_DEST_DIR}/sasexe/dbi/sasnfx \
                 -e mcn_main "
hp_nfx600_af=" -R80000 -HF -N -a archive -lV3 -lm -lc"

# Informix Version 6.10
hp_nfx610=" ${DBI_SASPATH}/obj/crt.o      \
    ${DBI_SASPATH}/obj/vipkludg.o         \
    ${DBI_SASPATH}/obj/dyncall.o          \
    ${DBI_SASPATH}/obj/MCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/PCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/nfxsql.o           \
    ${DBI_SASPATH}/obj/inftbl.o           \
    ${DBI_SASPATH}/olb/wxfer.a            \
    ${dbmshome}/lib/esql/libgls.a         \
    ${dbmshome}/lib/esql/libsql.a         \
    ${dbmshome}/lib/libasf.a              \
    ${dbmshome}/lib/netlib.a              \
    ${dbmshome}/lib/esql/libgen.a         \
    ${dbmshome}/lib/esql/libos.a          \
    ${dbmshome}/lib/nettlistub.a          \
    ${DBI_SASPATH}/olb/vxfer.a "

hp_nfx610_b4="ld -o ${DBI_DEST_DIR}/sasexe/dbi/sasnfx \
                 -e mcn_main "
hp_nfx610_af=" -R80000 -HF -N -a archive -lV3 -lm -lc"

# Informix Version 7.10
hp_nfx710=" ${DBI_SASPATH}/obj/crt.o      \
    ${DBI_SASPATH}/obj/vipkludg.o         \
    ${DBI_SASPATH}/obj/dyncall.o          \
    ${DBI_SASPATH}/obj/MCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/PCN_sasnfx.o       \
    ${DBI_SASPATH}/obj/nfxsql.o           \
    ${DBI_SASPATH}/obj/inftbl.o           \
    ${DBI_SASPATH}/olb/wxfer.a            \
    ${dbmshome}/lib/esql/libsql.a         \
    ${dbmshome}/lib/libasf.a              \
    ${dbmshome}/lib/netlib.a              \
    ${dbmshome}/lib/esql/libgen.a         \
    ${dbmshome}/lib/esql/libos.a          \
    ${dbmshome}/lib/netstub.a             \
    ${DBI_SASPATH}/olb/vxfer.a "

hp_nfx710_b4="ld -o ${DBI_DEST_DIR}/sasexe/dbi/sasnfx \
                 -e mcn_main "
hp_nfx710_af=" -R80000 -HF -N -a archive -lV3 -lm -lc"

# Informix Version 7.10.UD1
hp_nfx7UD1="
    ${DBI_SASPATH}/obj/nfxsql.o             \
    ${DBI_SASPATH}/obj/inftbl.o             \
    ${DBI_SASPATH}/obj/pkludg.o             \
    ${dbmshome}/lib/esql/libsql.sl          \
    ${dbmshome}/lib/libasf.sl               \
    ${dbmshome}/lib/libnetstub.sl           \
    ${dbmshome}/lib/esql/libgen.sl          \
    ${dbmshome}/lib/esql/libos.sl"

hp_nfx7UD1_b4="ld -o ${DBI_DEST_DIR}/sasexe/dbi/sasnfxsl \
                  -b -z  "
hp_nfx7UD1_af=" "



#############################################
# AIX Informix Manifest listing
#############################################
aix_nfx500=" ${DBI_SASPATH}/obj/MCN_sasnfx.o \
    ${DBI_SASPATH}/obj/PCN_sasnfx.o          \
    ${DBI_SASPATH}/obj/nfxsql.o              \
    ${DBI_SASPATH}/obj/inftbl.o              \
    ${DBI_SASPATH}/obj/vipkludg.o            \
    ${DBI_SASPATH}/olb/wxfer.a               \
    ${dbmshome}/lib/esql/libsql.a            \
    ${dbmshome}/lib/esql/libgen.a            \
    ${dbmshome}/lib/esql/libos.a             \
    ${DBI_SASPATH}/olb/vxfer.a               \
    ${DBI_SASPATH}/olb/vxfer.a               \
     ${DBI_SASPATH}/olb/ptrgl.a              \
    ${DBI_SASPATH}/olb/wxfer.a "

aix_nfx500_b4="ld -o ${DBI_DEST_DIR}/sasexe/dbi/sasnfx \
   -H512  \
   -T512  \
   -b import:/lib/syscalls.exp \
   -b glink:/lib/glink.o \
   -b noloadmap  \
   -b h:4 \
   -e mcn_main -lbsd"
aix_nfx500_af=" -lm -lc "

# Informix Version 6.00
aix_nfx600=" ${DBI_SASPATH}/obj/MCN_sasnfx.o \
    ${DBI_SASPATH}/obj/PCN_sasnfx.o          \
    ${DBI_SASPATH}/obj/nfxsql.o              \
    ${DBI_SASPATH}/obj/inftbl.o              \
    ${DBI_SASPATH}/obj/vipkludg.o            \
    ${DBI_SASPATH}/olb/wxfer.a               \
    ${dbmshome}/lib/esql/libsql.a            \
    ${dbmshome}/lib/libasf.a                 \
    ${dbmshome}/lib/netlib.a                 \
    ${dbmshome}/lib/esql/libgen.a            \
    ${dbmshome}/lib/esql/libos.a             \
    ${dbmshome}/lib/nettlistub.a             \
    ${DBI_SASPATH}/olb/vxfer.a               \
    ${DBI_SASPATH}/olb/vxfer.a               \
    ${DBI_SASPATH}/olb/ptrgl.a               \
    ${DBI_SASPATH}/olb/wxfer.a "

aix_nfx600_b4="ld -o ${DBI_DEST_DIR}/sasexe/dbi/sasnfx \
   -H512  \
   -T512  \
   -b import:/lib/syscalls.exp \
   -b glink:/lib/glink.o \
   -b noloadmap  \
   -b h:4 \
   -e mcn_main -lbsd"
aix_nfx600_af=" -lm -lc "

# Informix Version 8.11 (XPS)
aix_nfx710=" ${DBI_SASPATH}/obj/MCN_sasnfx.o \
    ${DBI_SASPATH}/obj/PCN_sasnfx.o          \
    ${DBI_SASPATH}/obj/nfsql811.o            \
    ${DBI_SASPATH}/obj/inftbl.o              \
    ${DBI_SASPATH}/obj/vipkludg.o            \
    ${DBI_SASPATH}/olb/wxfer.a               \
    ${dbmshome}/lib/esql/libsql.a            \
    ${dbmshome}/lib/esql/libos.a             \
    ${dbmshome}/lib/libasf.a                 \
    ${dbmshome}/lib/netlib.a                 \
    ${dbmshome}/lib/esql/libgen.a            \
    ${dbmshome}/lib/esql/libos.a             \
    ${dbmshome}/lib/esql/libgen.a            \
    ${dbmshome}/lib/libasf.a                 \
    ${DBI_SASPATH}/olb/ptrgl.a               \
    ${DBI_SASPATH}/olb/wxfer.a "

aix_nfx710_b4="ld -o ${DBI_DEST_DIR}/sasexe/dbi/sasnfx  \
   -H512 \
   -T512 \
   -b import:/lib/syscalls.exp  \
   -b glink:/lib/glink.o        \
   -b noloadmap  \
   -b h:4 \
   -e mcn_main"
aix_nfx710_af=" -ltli -lmsaa -lbsd -lg -bexport:/usr/lib/libg.exp \
                -lc -L/usr/lpp/xlC/lib -ls -lmsaa -lm -lc "

}


#######################################################################
# informix_inst()                                                       #
#######################################################################
dbname=INFORMIX

# get the menu name
nfx_menu=${DBI_OSNAME}Informix${DBI_LEVEL}
case $DBI_OSNAME in
   HPUX)  ;;
   SUN4)  ;;
   SOL2)  ;;
   AIXR)  ;;
#   ULXR)  ;;
#   CNVX)  ;;
#   DGUX)  ;;
#   MABI)  ;;
#   IABI)  ;;
#   AOSF)  ;;
      *) echo "SAS/ACCESS Interface to $dbname not supported for $DBI_OSNAME"
         exit
         ;;
esac

# get the sybase version number
nfx_version=`fmenu  $nfx_menu`
if [ $nfx_version = 0 ]; then
   exit
fi


dbmshome=${INFORMIXDIR-}
assign dbmshome_default "$dbmshome"
assign dbmshome_assigned false
dbmshome=`resolve var dbmshome`

echo ' '
echo "SAS/ACCESS Interface to INFORMIX for $DBI_OSNAME_LONG "|tee -a $DBI_LOGFILE
echo The values you selected:|tee -a $DBI_LOGFILE
echo ------------------------|tee -a $DBI_LOGFILE
case $nfx_version in
   5.00P) echo "INFORMIX Version:         prior to Version 5.02"|tee -a $DBI_LOGFILE
          ;;
   5.00) echo "INFORMIX Version:         prior to Version 5.02"|tee -a $DBI_LOGFILE
         ;;
      *) echo "INFORMIX Version:         $nfx_version"|tee -a $DBI_LOGFILE
         ;;
esac

echo "INFORMIX root Directory : $dbmshome           "|tee -a $DBI_LOGFILE
echo ' '

proceed=`ask_oneof "Continue? [Y/N]" Y N y n -d Y`
if [ "$proceed" = "N" -o "$proceed" = "n" ]; then
   echo ' '
   echo 'You selected No. Backing up to the Database Selection menu.'|tee -a $DBI_LOGFILE
   exit
fi


# set INFORMIXDIR to $dbmshome
INFORMIXDIR="$dbmshome"; export INFORMIXDIR

informix_manifests

# Branch on OSNAME for clarity and in case there are multiple
# manifests (one for each or more versions) per OS in the future.
case $DBI_OSNAME in
   SUN4)

#     default manifest for 5.00 thru 5.02
        manifest=${sun4_nfx500}
        link_b4=${sun4_nfx500_b4}
        link_af=${sun4_nfx500_af}

#     now we need to move the .o file into place.
#     this will require write access, which should exist.
      case $nfx_version in
         "5.00P")
            cp ${DBI_SASPATH}/obj/nfxsql50.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            ;;
         "5.00")
            cp ${DBI_SASPATH}/obj/nfsql500.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            ;;
         "5.02")
            cp ${DBI_SASPATH}/obj/nfsql502.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            ;;
         "6.00")
            cp ${DBI_SASPATH}/obj/nfsql600.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            manifest=${sun4_nfx600}
            link_b4=${sun4_nfx600_b4}
            link_af=${sun4_nfx600_af}

            ;;
         *)
           echo "Unknown Informix version $nfx_version under $DBI_OSNAME"
           exit
           ;;
      esac

      if [ $status != 0 ]; then
         echo "Could not copy files to "|tee -a $DBI_LOGFILE
         echo " ${DBI_SASPATH}/obj"|tee -a $DBI_LOGFILE
         echo "Probable causes:"|tee -a $DBI_LOGFILE
         echo "-- lack of write permission in that directory. "|tee -a $DBI_LOGFILE
         echo "-- missing object files in that directory. "|tee -a $DBI_LOGFILE
         echo "Please call Technical Support if you need assistance."
         exit 1
      fi

      ;;


   SOL2)

#     default manifest for 5.00 thru 5.02
        manifest=${sol2_nfx500}
        link_b4=${sol2_nfx500_b4}
        link_af=${sol2_nfx500_af}

#     now we need to move the .o file into place.
#     this will require write access, which should exist.
      case $nfx_version in
         "5.00P")
            cp ${DBI_SASPATH}/obj/nfxsql50.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            ;;

         "5.00")
            cp ${DBI_SASPATH}/obj/nfsql500.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            ;;
         "5.02")
            cp ${DBI_SASPATH}/obj/nfsql502.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            ;;
         "6.00")
            cp ${DBI_SASPATH}/obj/nfsql600.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            manifest=${sol2_nfx600}
            link_b4=${sol2_nfx600_b4}
            link_af=${sol2_nfx600_af}

            ;;
         "7.10")
            cp ${DBI_SASPATH}/obj/nfsql710.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            manifest=${sol2_nfx710}
            link_b4=${sol2_nfx710_b4}
            link_af=${sol2_nfx710_af}

            ;;
         *)
           echo "Unknown Informix version $nfx_version under $DBI_OSNAME"
           exit
           ;;
      esac

      if [ $status != 0 ]; then
         echo "Could not copy files to "|tee -a $DBI_LOGFILE
         echo " ${DBI_SASPATH}/obj"|tee -a $DBI_LOGFILE
         echo "Probable causes:"|tee -a $DBI_LOGFILE
         echo "-- lack of write permission in that directory. "|tee -a $DBI_LOGFILE
         echo "-- missing object files in that directory. "|tee -a $DBI_LOGFILE
         echo "Please call Technical Support if you need assistance."
         exit 1
      fi

      ;;


   HPUX)

#     default manifest for 5.00 thru 5.02
        manifest=${hp_nfx500}
        link_b4=${hp_nfx500_b4}
        link_af=${hp_nfx500_af}

#     now we need to move the .o file into place.
#     this will require write access, which should exist.
      case $nfx_version in
         "5.00P")
            cp ${DBI_SASPATH}/obj/nfxsql50.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            ;;

         "5.00")
            cp ${DBI_SASPATH}/obj/nfsql500.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            ;;
         "5.02")
            cp ${DBI_SASPATH}/obj/nfsql502.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            ;;
         "6.00")
            cp ${DBI_SASPATH}/obj/nfsql600.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            manifest=${hp_nfx600}
            link_b4=${hp_nfx600_b4}
            link_af=${hp_nfx600_af}

            ;;
         "6.10")
            cp ${DBI_SASPATH}/obj/nfsql610.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            manifest=${hp_nfx610}
            link_b4=${hp_nfx610_b4}
            link_af=${hp_nfx610_af}

            ;;
         "7.10")
            cp ${DBI_SASPATH}/obj/nfsql710.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            manifest=${hp_nfx710}
            link_b4=${hp_nfx710_b4}
            link_af=${hp_nfx710_af}

            ;;
         "7UD1")
#           copy sasnfxld to sasnfx
            cp ${DBI_DEST_DIR}/sasexe/dbi/sasnfxld ${DBI_DEST_DIR}/sasexe/dbi/sasnfx
            cp ${DBI_SASPATH}/obj/nfsqlUD1.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            manifest=${hp_nfx7UD1}
            link_b4=${hp_nfx7UD1_b4}
            link_af=${hp_nfx7UD1_af}

            ;;
         *)
           echo "Unknown Informix version $nfx_version under $DBI_OSNAME"
           exit
           ;;
      esac

      if [ $status != 0 ]; then
         echo "Could not copy files to "|tee -a $DBI_LOGFILE
         echo " ${DBI_SASPATH}/obj"|tee -a $DBI_LOGFILE
         echo "Probable causes:"|tee -a $DBI_LOGFILE
         echo "-- lack of write permission in that directory. "|tee -a $DBI_LOGFILE
         echo "-- missing object files in that directory. "|tee -a $DBI_LOGFILE
         echo "Please call Technical Support if you need assistance."
         exit 1
      fi

      ;;


   AIXR)

#     default manifest for 5.00 thru 5.02
        manifest=${aix_nfx500}
        link_b4=${aix_nfx500_b4}
        link_af=${aix_nfx500_af}

#     now we need to move the .o file into place.
#     this will require write access, which should exist.
      case $nfx_version in
         "5.00P")
            cp ${DBI_SASPATH}/obj/nfxsql50.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            ;;

         "5.00")
            cp ${DBI_SASPATH}/obj/nfsql500.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            ;;
         "5.02")
            cp ${DBI_SASPATH}/obj/nfsql502.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            ;;
         "6.00")
            cp ${DBI_SASPATH}/obj/nfsql600.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            manifest=${aix_nfx600}
            link_b4=${aix_nfx600_b4}
            link_af=${aix_nfx600_af}

            ;;
         "7.10")
            cp ${DBI_SASPATH}/obj/nfsql710.o ${DBI_SASPATH}/obj/nfxsql.o
            status=$?

            manifest=${aix_nfx710}
            link_b4=${aix_nfx710_b4}
            link_af=${aix_nfx710_af}

            ;;
         *)
           echo "Unknown Informix version $nfx_version under $DBI_OSNAME"
           exit
           ;;
      esac

      if [ $status != 0 ]; then
         echo "Could not copy files to "|tee -a $DBI_LOGFILE
         echo " ${DBI_SASPATH}/obj"|tee -a $DBI_LOGFILE
         echo "Probable causes:"|tee -a $DBI_LOGFILE
         echo "-- lack of write permission in that directory. "|tee -a $DBI_LOGFILE
         echo "-- missing object files in that directory. "|tee -a $DBI_LOGFILE
         echo "Please call Technical Support if you need assistance."
         exit 1
      fi

      ;;
   ULXR)  ;;
   CNVX)  ;;
   DGUX)  ;;
   MABI)  ;;
   IABI)  ;;
   AOSF)  ;;
esac

zdbilink.ins "$dbname"  "$manifest"   "$link_b4"  "$link_af"


