Creating and running an Embedded SQL program

Follow these steps to create and run your Embedded SQL application program:

  1. Write the application program and include the Embedded SQL statements and variable declarations.

  2. Save the application in a .pco file.

  3. 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 COBOL compiler. For details, see the Open Client and Open Server Programmer’s Supplement.

  4. Compile the new source code as you would compile a standard COBOL program.

  5. Link the compiled code, if necessary, with the required libraries.

  6. If you specified the precompiler option to generate stored procedures, load them into Adaptive Server by executing the generated script with isql.

  7. Run the application program as you would any standard COBOL program.