#!/bin/bash

# Copyright (c) 2000, 2004 IBM Corp. - All Rights Reserved.
# IBM makes no representations or warranties about the suitability of
# this program, either express or implied, including but not limited to
# the implied warranties of merchantability, fitness for a particular
# purpose, or non-infringement. 
  

# 
# # Copyright (c) 2000, 2004 IBM Corp. - All Rights Reserved.
# # IBM makes no representations or warranties about the suitability of
# # this program, either express or implied, including but not limited to
# # the implied warranties of merchantability, fitness for a particular
# # purpose, or non-infringement. 
# 
#



if [ "$CCD_DB" = "oracle" ]; then
	${ECHO} ====================================================
	${ECHO} No Database objects required to be created
	${ECHO} ====================================================
elif [ "$CCD_DB" = "db2" ]; then
	${ECHO} ====================================================
	${ECHO} Loading new function SSINSTR
	${ECHO} ====================================================
  . ${DB_DIR}/util/run_db_cmd.sh --file=$DB_SCRIPTS/instr_function.sql

	${ECHO} ====================================================
	${ECHO} "Loading new functions SSRPAD and SSLPAD"
	${ECHO} ====================================================
  . ${DB_DIR}/util/run_db_cmd.sh --file=$DB_SCRIPTS/rightpad_and_leftpad_function.sql

	${ECHO} ====================================================
	${ECHO} "Loading new function GREATEST"
	${ECHO} ====================================================
  . ${DB_DIR}/util/run_db_cmd.sh --file=$DB_SCRIPTS/greatest_function.sql

	${ECHO} ====================================================
        ${ECHO} "Loading new function CONVERTDATEFORMAT"
        ${ECHO} ====================================================
  . ${DB_DIR}/util/run_db_cmd.sh --file=$DB_SCRIPTS/convert_date_format_function.sql

else 
	${ECHO} "Error! Database Environment has not been set."
	exit
fi
