Languages used to create stored procedures
Stored procedures can be written in a variety of programming languages from object-oriented programming languages to traditional programming languages.
You can write stored procedures in the following programming languages:
- Java™
- If you have more experience writing applications in an object-oriented programming environment, you might want to create stored procedures by using Java
- SQL procedural language
- If your application consists entirely of SQL statements, some simple control flow logic, and no complex application logic, you might choose to create your stored procedures by using the SQL procedural language.
- REXX
- You can create stored procedures by using REXX programs that can contain dynamic SQL. DBAs and programmers generally use REXX for administrative tasks.
- Traditional programming languages: C, C++, COBOL, PL/I, and Assembler
- All traditional language programs must be designed to run using Language Environment®. COBOL and C++ stored procedures can contain object-oriented extensions.
The program that calls the stored procedure can be in any language that supports the SQL CALL statement. ODBC and JDBC applications can use an escape clause to pass a stored procedure call to Db2.