After you have written the source file, you have to build your embedded SQL application.
Some steps in the build process depend on the compiler that you use. The examples provided with each step of the procedure show how to build an application called myapp with a Microsoft Visual Studio 6.0 compiler, which is a C compiler. You can run each step in the procedure individually or run the steps together within a batch file from a DB2® Command Window prompt. For an example of a batch file that can be used to build the embedded SQL sample applications in the %DB2PATH%\SQLLIB\samples\c\ directory, refer to the %DB2PATH%\SQLLIB\samples\c\bldapp.bat file. This batch file calls another batch file, %DB2PATH%\SQLLIB\samples\c\embprep.bat, to precompile the application and bind the application to a database.