IBM Db2 for z/OS Developer Extension
IBM® Db2® for z/OS® Developer Extension (Db2 Developer Extension) is an extension for Visual Studio Code that provides language support for developing Db2 for z/OS SQL applications.
This extension provides language support for the Structured Query Language (SQL) syntax that is used to define, manipulate, and control data in IBM Db2 for z/OS databases.
The features provided in this extension simplify the task of developing applications that interact with data in Db2 for z/OS databases by providing:
See the Features section for more details and examples.
Table of contents
Privacy notice for feedback
Db2 Developer Extension is provided free of charge, but we ask you to provide us feedback via the various means available, such as submitting an issue in our GitHub repository, submitting review comments in the VS Code Marketplace, and keeping the built-in telemetry and crash reports enabled.
This extension uses Microsoft VS Code's Telemetry solution, which collects telemetry data that is used to help understand how to improve the product. While we appreciate the insights this data provides, we also know that not everyone wants to send usage data. You can disable telemetry as described in Disable Telemetry Reporting. You can also read IBM's General Privacy Statement to learn more about our policies.
This current release of Db2 Developer Extension will collect anonymous data for the following events:
Each of these events is logged with the following information:
Prerequisites for installing Db2 Developer Extension
Installing Db2 Developer Extension requires the following software:
Because part of the SQL language server in IBM Db2 for z/OS Developer Extension is implemented using Java, a Java runtime must be defined in the program path to start Db2 Developer Extension in VS Code. You can specify the specific Java runtime that you want to use and you can set additional Java configuration parameters, such as how much memory the extension can use, in the VS Code User or Workspace Settings. You can also specify a Java runtime and set configuration parameters by editing the
Specifying the Java runtime for the Db2 Developer Extension language server
The language server client that is running in the Db2 Dev Extension checks the following places to find a matching Java runtime:
If a Java runtime is not found in any of these locations, an error message is issued. To resolve the problem, specify a Java runtime in one of these locations.
Tip: Alternatively, you can specify a path to a Java SDK on the
Specifying the Db2 SQL Service port number
The Db2 SQL Service (DSS) provides support for parsing Db2 SQL syntax and for communicating with Db2. Complete the following steps to specify the port that the DSS server will run on.
Code completion and signature help
Code completion simplifies the process of writing SQL statements by suggesting valid completions as you type. Signature help provides information about the parameters that are required by a function or procedure. For this release, these features are provided for Db2 built-in functions and stored procedures only.
You can run individual SQL statements that you highlight or all of the SQL statements in a file directly from Db2 Developer Extension by right-clicking in a file and selecting Run Selected or Run All respectively. You can run SQL with or without parameter markers and host variables, and you can save your SQL execution results in a .csv file. You can also specify run options to control how your SQL is parsed and run.
Adding a database connection
To create connections to Db2 databases, launch the Add connection wizard by clicking the plus sign (+) in the Db2 Developer Extension CONNECTIONS view.
Syntax checking automatically recognizes when an SQL element has been specified incorrectly and provides the valid expected replacement either by hovering over an incorrectly specified element or by displaying it in the PROBLEMS view.
Syntax highlighting makes it easier to visually parse your code and to identify particular syntax elements based solely on their appearance. Db2 Developer Extension classifies all elements of a particular type into a group and applies a highlighting theme at the group level so that it's easy to customize highlighting themes.
The following example shows the default highlighting theme:
Db2 Developer Extension provides code snippets for the most commonly used SQL syntax, complete with required parameters and options. These snippets provide you with a starting point that you can quickly build upon to create the SQL statements that you need and to customize snippets for your particular needs.
The following example shows how to select and insert various SQL DDL statements:
Limitations for this release