Database Management for Db2 z/OS
The Database Management for Db2 z/OS (DBM-Db2) Code4z extension empowers developers and DBAs to self-provision Db2
objects, make and deploy schema changes directly from VS Code, and drive the entire development process without
switching tools.
DBM-Db2 is part of the Code4z experience from Broadcom, which offers a modern
experience for mainframe application developers. To get started with Code4z, check out our foundational
extension pack.
Address Software Requirements
Before you install the DBM-Db2 extension, ensure that Database Management Solutions for Db2 for z/OS and its required
components are configured, running on mainframe, and current on maintenance.
The required components include:
- RC/Migrator and RC/Compare
- Execution Networking Manager (Xnet)
- DBM Data Service (REST API)
We recommend using the Zowe API Mediation Layer for centralized authentication of the DBM Data Service.
For more information about these components, see the
Database Management Solutions for Db2 for z/OS documentation.
Integrate with Zowe Explorer
We recommend that you use the extension with Zowe Explorer. Zowe Explorer provides a default location for DBM-Db2 views
and supports authentication through the Zowe API Mediation Layer (API ML), enabling integrated sign-on profile sharing
in VS Code.
DBM-Db2 is Zowe Explorer V3 conformant. For more information about Zowe Explorer, see the
Zowe Explorer for Visual Studio Code on Marketplace.
Review DBM-Db2 Capabilities
The DBM-Db2 extension provides schema management capabilities for Db2 for z/OS to generate, validate, and deploy DDL
changes, and copy Db2 objects and dependencies across subsystems.
Db2 Schema Management View
Shows execution profiles (dbm-db2-options profiles), and active Db2 subsystems and data sharing groups that are
available for the selected connection profile (dbm-db2 profile).
Click the Refresh Profiles icon to retrieve
the latest profile configurations. Hover over a profile name to see its definition. Click the Edit Profile button
(pencil icon) to open the team configuration file and automatically navigate to the selected profile.
Commands available for each Db2 subsystem or data sharing group:
Generate DDL
Guides you through the process of generating Data Definition Language (DDL) statements for a selected Db2 object and
its dependencies.
Copy Objects
Guides you through copying objects and their data using easy-to-follow menus.
Db2 Management History View
Shows completed DBM-Db2 operations, including execution details, input files, and output files. Additional actions are
available depending on the file type:
For a SQL file:
- Click a file to open it in the editor and view DDL file analysis details.
- Right-click a file for additional available operations, such as Analyze, Check, and Deploy DDL commands.
For any file:
- To save a file to a custom location, right-click it and select Save As.
- To compare two files, select both files and choose Compare Selected from the right-click menu.
Click a history record to view runtime information for the action.
Status Bar
Shows the selected Db2 subsystem, active execution profile, and any operation in progress. Click a subsystem name or
profile to navigate to the related profile selection in the Db2 Schema Management view.
Context Commands
The following commands are available for execution against an SQL file listed in Explorer, Zowe Explorer
(Data Sets or USS views), Db2 Management History View, or already opened in the editor area as a full file or a
selection.
Analyze DDL
Analyzes the SQL DDL file and displays an analysis view that groups DROP, CREATE, and ALTER statements by Db2 object
type. The analysis view links each statement to its position in the editor, letting you quickly locate, select, and
edit specific DDL statements.
Check DDL Syntax
Checks if the DDL syntax is valid.
Check DDL Execution
Verifies that the primary objects to be created do not exist on the target Db2 and that all required related objects
exist on the target Db2 or in the DDL. Performs a minimal dependency check for referential integrity and operational
functionality.
Deploy DDL
Compares input DDL statements with object definitions at the target Db2 environment to determine an optimal
deployment scenario. Pauses execution to represent suggested DDL operations visually and allow you to
review the impact and confirm deployment.
Note: You can use execution profiles to customize the behavior of DDL operations.
DBM-Db2 Panel
Automatically opens and shows details for the selected completed operation from the Db2 Management History view and
output from the Analyze DDL operation.
Messaging
The standard VS Code messaging system reports on the success or failure of DBM-Db2 operations. When an operational
error occurs, an error file is typically saved and opened for review.
To determine whether a problem is related to this particular extension, expand the error notification in the
lower-right corner and verify that the following line is present:
Source: Database Management for Db2 z/OS
Before you can use the DBM-Db2 extension, ensure that a Zowe team configuration file is correctly set up. Complete the
following steps to create or update the configuration file:
Note: Skip these steps if your existing Zowe team configuration already contains
dbm-db2 and dbm-db2-options profiles.
Open Zowe Explorer (or Explorer if Zowe Explorer is not installed).
Expand the Db2 Schema Management view.
Click the Add Profile button.
Select the location (Global or Project) where you want to store the Zowe team configuration file.
Note: If the file already exists, adding a profile updates any missing profiles or properties without overriding
the existing configuration.
A Zowe team configuration file is created with two profile types (dbm-db2 and dbm-db2-options) filled with
default values, or an existing file is updated. The file opens in a new tab.
Edit the new profiles as needed. Context popup help is available for each profile property.
Note: The default host value is not provided. Use the host that is specified in the base profile or specify a
host.
To save the file, select File, Save from the menu bar.
Refresh the Db2 Schema Management view to retrieve the latest profiles and property values.
Note: If Zowe Explorer is installed, refresh occurs automatically when the Zowe team configuration file is
saved.
(Optional) Authenticate through the Zowe API Mediation Layer (if configured) using one of the following options:
- Run the
zowe auth login apiml CLI command.
- In Zowe Explorer, right-click one of your profiles and select Log in to Authentication Service.
The token is generated and saved to the base profile.
Expand the connection profile in the Db2 Schema Management view. If you are not already authenticated, you are
prompted to enter your mainframe credentials. The credentials are stored in the Secure Credentials Store and are not
requested for subsequent calls. To update credentials, right-click the profile name and select Update Credentials.
If a list of active Db2 subsystems and data sharing groups appears in the view, the configuration is successful. You
are ready to use the DBM-Db2 extension.
Use DBM-Db2
Select an Execution Profile
To apply customization options during DBM-Db2 operations, such as performing automatic DDL schema changes, select an
execution profile.
Expand Execution Profiles.
A list of available dbm-db2-options profiles appears.
Double-click the profile that you want to select.
Note: To deselect a profile, double-click the profile again, or select a different profile.
The selected profile is marked in the list, appears in the status bar, and is used for subsequent operations.
Generate DDL
To retrieve Db2 object schema definitions (DDL statements) from the Db2 catalog, use the Generate DDL operation.
Expand a connection profile in the Db2 Schema Management view.
Hover over a Db2 subsystem or data sharing group, and click the Generate DDL icon.
The Generate DDL: Object type (1/3) menu appears.
Select the type of an object that you want to retrieve.
The Generate DDL: Object name (2/3) menu appears.
Specify the object name.
Note: The input field shows a sample value. Square brackets ([]) indicate optional parts and must be removed.
The Generate DDL: Dependent objects (3/3) menu appears.
Select the types of dependent objects to retrieve along with the selected object, and press Enter.
The DDL statements are written to an SQL file that opens in a new tab.
Copy Objects
To copy Db2 objects and their data within or between subsystems, use the Copy Objects operation.
Expand a connection profile in the Db2 Schema Management view.
Hover over a Db2 subsystem or data sharing group, and click the Copy Objects icon.
The Copy Objects: Object type (1/4) menu appears.
Select the object type you want to copy.
The Copy Objects: Object name (2/4) menu appears.
Specify the object name.
Note: The input field shows a sample value. Square brackets ([]) indicate optional parts and must be removed.
The Copy Objects: Dependent objects (3/4) menu appears.
Select the types of dependent objects to copy along with the selected object, and press Enter.
The Copy Objects: Target Db2 (4/4) menu appears.
Select the target Db2 subsystem or data sharing group for copying.
A notification confirms successful completion.
Note: The maximum number of rows copied from the source object can be defined in the DBM Data Service
configuration.
Analyze DDL
To list DDL statements, use the Analyze DDL operation in the context menu available when you right-click the SQL file
name in the editor area.
The analysis results open in the DBM-Db2 panel that supports editor navigation:
- Click an object type to navigate and select all statements of that object type in the editor area.
- Click an object name to select a single DDL statement.
- Use Ctrl+click or Shift+click to select multiple individual statements or ranges.
Check DDL Syntax
To check the correctness of DDL statements, use the Check DDL Syntax operation in the context menu available when you
right-click the SQL file name or in the editor area.
A notification confirms successful completion.
Check DDL Execution
To check that DDL is executable on a target Db2, use the Check DDL Execution operation in the context menu available
when you right-click the SQL file name or in the editor area.
A notification confirms successful completion.
Deploy DDL
To apply schema changes to objects on a target Db2, use the Deploy DDL operation.
Right-click the SQL file and select Deploy DDL.
Note: The context menu is available for SQL files in:
- Explorer
- Zowe Explorer (Data Sets and USS views)
- Db2 Management History view
- Open tabs
- Open editors (full document, selection, or multi-selection)
The confirmation tab appears (Step 1).
Verify the selected input file, target Db2, and execution profile. Change if needed, and press Proceed to
continue the deployment.
The confirmation tab is updated with implementation details (Step 2).
Verify the deployment impact, then click Proceed to commit the changes or Cancel to abort.
A notification confirms successful completion.
License
The DBM-Db2 extension is made available to customers on the Visual Studio Code Marketplace in accordance with the terms
and conditions contained in the provided End-User License Agreement (EULA).
Technical Assistance and Support
If you are on active support for Database Management Solutions for Db2 for z/OS, you may be eligible for technical
assistance and support. For terms, guidelines, and details, see
Broadcom Support Policies.
Copyright © 2025 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.