@echo off
rem Licensed Materials - Property of IBM
rem
rem Governed under the terms of the International
rem License Agreement for Non-Warranted Sample Code.
rem
rem (C) COPYRIGHT International Business Machines Corp. 1997 - 2002
rem All Rights Reserved.
rem
rem US Government Users Restricted Rights - Use, duplication or
rem disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
rem BATCH FILE: embprep.bat
rem Prep and binds a C/C++ or Micro Focus COBOL embedded SQL program on Windows
rem Usage: embprep <prog_name> [ <db_name> [ <userid> <password> ]]
rem Connect to a database.
if "%1" == "" goto error
if "%2" == "" goto case1
if "%3" == "" goto case2
if "%4" == "" goto error
goto case3
:case1
db2 connect to sample
goto prep_step
:case2
db2 connect to %2
goto prep_step
:case3
db2 connect to %2 user %3 using %4