Announcing IBM Db2 for z/OS Developer Extension 1.1
By Kendrick Ren and Eric Radzinski
We're happy to announce our third release of Db2 Developer Extension, available as of February 23rd from Microsoft Visual Studio Code Marketplace.
If you're not yet familiar with Db2 for z/OS Developer Extension, the prior two releases introduced a basic yet robust set of tools for helping developers write and run SQL applications against Db2 databases on the mainframe. These tools include:
- A database connection wizard that makes it easier to connect to Db2 for z/OS databases
- Code snippets and code completion that make it easy for you to write common SQL statements quickly
- Syntax checking to help ensure that your SQL is error free
- Customizable syntax highlighting to make it easier to parse your code
- The ability to run your SQL directly from the extension, to view the results, and to troubleshoot any errors that might have occurred
This latest release goes beyond basic functionality by adding several significant new enhancements:
- Granular commit and rollback support. For example, you have the option of either committing a transaction as a whole unit or stopping the transaction when an error occurs and rolling back the changes. And (for testing purposes only), you can roll back changes that were committed, such as INSERTs, UPDATEs, DELETEs, or DROPs, to the pre-commit state so that your test environment remains uncorrupted. These are just two of the available settings.
- Arguably the most significant new tool in the Db2 Developer Extension toolbox is end-to-end support for Db2 for z/OS native stored procedures.
If you're familiar with the benefits of using stored procedures, you know that they're a valuable way to increase the performance, efficiency, and scalability of your SQL applications. Native Db2 for z/OS stored procedures are stored procedures that are written entirely in SQL or SQL PL. With Db2 Developer Extension 1.1, you can now write, configure, deploy, run, and debug these types of stored procedures, all from within the extension's interface.
For example, you can start by using the extension's code snippets feature to create your stored procedure:
Save the stored procedure as an .spsql file, specify some basic deployment options and routine options, then click Finish to deploy the stored procedure. Now it's ready to run.
Results are displayed in the SQL result view. If you selected the Enable debugging deployment option, you can debug the stored procedure, validate the logic, and fix any errors that might be present in your code.
For example, the following screenshot shows a debugging session in progress. The developer has set a few breakpoints, two of which have already been hit (lines 23 and 25) and a third that the debugging process has stopped on (line 32). On the left side of the view, the developer can check the values of the variables and even overwrite the values to validate different logic. They can also add variables to that they want to watch and can check the call stack.
If you write SQL applications that access Db2 for z/OS databases, and you haven't given Db2 Developer Extension a look, now would be a great time to do so. With the new features provided in 1.1, Db2 Developer Extension takes another huge step in becoming the go-to extension for writing SQL in Visual Studio Code. But don't just take our word for it. You can read about one user's first experiences with Db2 Developer Extension at the Diary of a Database Geek
. And after you've kicked the tires, tell us what you think by opening an issue in our GitHub repository
or by submitting a review comment in the Visual Studio Code Marketplace.
Kendrick Ren is the IBM Db2 for z/OS Developer Extension Technical Lead, and Eric Radzinski is an Information Developer for Db2 for z/OS.
Sign in and subscribe to always get the latest news about Db2 for z/OS from the IBM lab: http://ibm.biz/db2znews-subscribe