#! /bin/ksh # (C) COPYRIGHT International Business Machines Corp. 1995, 1997 # 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 C embedded SQL sample # Usage: embprep [ [ ]] # Connect to a database. if (($# < 3)) then db2 connect to sample elif (($# < 4)) then db2 connect to $3 else db2 connect to $3 user $4 using $5 fi # Precompile the program. db2 prep $1.sqc bindfile ISOLATION $2 PACKAGE USING $1$2 # Bind the program to the database. db2 bind $1.bnd # Disconnect from the database. db2 connect reset