Creating a stored procedure:
1. Click the object Stored Procedure in the tree. The Stored Procedures page appears.

2. Click the Create button. The Introduction window of the Create Stored Procedure wizard appears.

3. Click the Next button. The Language Type wizard appears.

4. Select a language to use for writing the stored procedure by clicking either the ESQL/C radio button or the Java radio button. Procedure to step 5 when ESQL/C is used. Procedure to step 9 when Java is used.
5. Click the Next button. The Final Review window appears. Input the ESQL/C statement or click the Import button to import an ESQL/C statement from a file.

6. Click the Import button. The Open window appears. Import files from any source, including the SPDIR directory of other databases on the server or network drives. Enter the path in the File name field, or browse the directory tree until the desired path is found.

7. Click the Open button.
8. The Final review window reappears as in the example below if the imported file contains properly formatted (ASCII) text, or if you choose to manually enter the code. Click the Save As button to save the stored procedure to another location, or click Finish to compile and save the stored procedure in the database.

9. Click the Next button. The Final Review window appears. Input the Java stored procedure SQL script. Click the Finish button.

10. If the Stored Procedure compiles correctly, the following message appears.

11. Click the OK button.