#**********************************************************************#
#*                                                                    *#
#* Copyright (c) 2001 by Sun Microsystems, Inc.                       *#
#* All rights reserved.                                               *#
#*                                                                    *#
#**********************************************************************#

echo "Compiling ACCTSET.bms"
kixbms -a -c ACCTSET.bms

echo "Translating acct00"
kixclt acct00.ccs
echo "compiling acct00.c"
cc -Bdynamic -Kpic -c -Xt -I $UNIKIX/src/CICS_structures -I $INCLUDE -o acct00.o acct00.c
ld -G -o acct00.so acct00.o

echo "Connecting to DB2"
db2 connect to $DB2DBDFT 
db2 prep acct01.sqc

echo "Precompilin acct01"
mv acct01.c acct01.ccs
echo "Translating acct01"
kixclt acct01.ccs
echo "compiling acct01.c"
cc -Bdynamic -Kpic -c -Xt -I $UNIKIX/src/CICS_structures -I $INCLUDE -o acct01.o acct01.c
ld -G -o acct01.so acct01.o

echo "Precompiling acct02"
db2 prep acct02.sqc
mv acct02.c acct02.ccs
echo "Translating acct02"
kixclt acct02.ccs
echo "compiling acct02.c"
cc -Bdynamic -Kpic -c -Xt -I $UNIKIX/src/CICS_structures -I $INCLUDE -o acct02.o acct02.c
ld -G -o acct02.so acct02.o

echo "Precompiling acctfet"
db2 prep acctfet.sqc
mv acctfet.c acctfet.ccs
echo "Translating acctfet"
kixclt acctfet.ccs
echo "compiling acctfet.c"
cc -Bdynamic -Kpic -c -Xt -I $UNIKIX/src/CICS_structures -I $INCLUDE -o acctfet.o acctfet.c
ld -G -o acctfet.so acctfet.o

echo "Translating acct03"
kixclt acct03.ccs
echo "compiling acct03.c"
cc -Bdynamic -Kpic -c -Xt -I $UNIKIX/src/CICS_structures -I $INCLUDE -o acct03.o acct03.c
ld -G -o acct03.so acct03.o

db2 terminate
