#! /bin/ksh

# (C) COPYRIGHT International Business Machines Corp. 1995, 1998
#  All Rights Reserved.
#
#  US Government Users Restricted Rights - Use, duplication or
#  disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

# embprep script file
# Shell script to prep and bind a Java embedded SQL (SQLJ) sample
# Usage: embprep <prog_name> [ <db_name> [ <userid> <password> ]]

if (($# < 2))
then
   db2profc -url=jdbc:db2:sample -prepoptions="package using $1" $1_SJProfile0
elif (($# < 3))
then
   db2profc -url=jdbc:db2:$2 -prepoptions="package using $1" $1_SJProfile0
else
   db2profc -url=jdbc:db2:$2 -user=$3 -password=$4 -prepoptions="package using $1" $1_SJProfile0
fi