Follow these steps to create and run an Embedded SQL application program:
Write the application program and include the Embedded SQL statements and variable declarations.
Save the application in a file with a .cp extension.
Precompile the application. If there are no severe errors, the precompiler generates a file containing your application program. The file has the same name as the original source file, with a different extension, depending on the requirements of your C compiler. For details, see the Open Client and Open Server Programmer’s Supplement for your platform.
Compile the new source code as you would compile a standard C program.
Link the compiled code with Client-Library.
If you specified the precompiler option to generate stored procedures, load them into Adaptive Server by executing the generated script with isql.
Run the application program as you would any standard C program.