Programming languages and methods for developing application programs that access Db2 for z/OS
You can use a wide variety of programming languages and techniques to develop application programs for Db2 for z/OS. In addition, several methods are available for communicating with Db2.
You can write application programs for Db2 for z/OS data servers in any of the following programming languages:
- APL2®
- Assembler
- C and C++
- C# 2 (through .NET)
- COBOL
- Fortran
- High-level Assembler (or HLASM)
- Java™ 1
- Node.js 3
- Perl 2
- PHP 2
- PL/I
- Python 4
- REXX
- Ruby on Rails 2
- SQL procedural language
- Visual Basic 2
- By connecting to Db2 for z/OS using IBM Data Server Driver for JDBC and SQLJ.
- By remote connections to Db2 for z/OS using Db2 for Linux®, UNIX, and Windows client drivers.
- By connecting to Db2 for z/OS using the IBM_DB Node.js driver.
- By connecting to Db2 for z/OS using the IBM_DB Python driver.
You can use any of the following programming methods:
- Static SQL
- The source form of a static SQL statement is embedded within an application program that is written in a traditional programming language. (Traditional programming languages include C, C++, COBOL, Fortran, PL/I, and Assembler.) Static SQL is a good choice when you know what statements an application needs to execute before the application runs.
- Dynamic SQL
- Unlike static SQL, dynamic statements are constructed and prepared at run time. Dynamic SQL is a good choice when you do not know the format of an SQL statement when you write a program. It is also a good choice when the program needs to generate part or all of an SQL statement based on input from its users.
- ODBC
- ODBC is an application programming interface (API) that C and C++ application programs can use to access relational databases. ODBC is well suited to the client/server environment.
- pureQuery®
- pureQuery is a high-performance data access platform for Java applications that makes it easier to develop, optimize, secure, and manage data access.
- SQLJ and JDBC
- Like ODBC and C++, the SQLJ and JDBC Java interfaces let
you write portable application programs that are independent of any one database product.
- SQLJ application support lets you write static SQL applications in the Java programming language. With SQLJ, you can embed SQL statements in your Java applications.
- JDBC application support lets you write dynamic SQL applications in the Java programming language. JDBC is similar to ODBC, but it is designed specifically for use with Java.