Connecting to z/OS with Zowe Explorer walk through
Overview
Zowe Explorer VS Code extension adds support for connecting to z/OS, and the connection details are specified in the team configuration file. The team configuration file is a JSON file that contains definitions for profiles to connect to z/OS by using different methods such as RSE API, z/OSMF API, SSH, and FTP. Zowe framework is open source and supports extenders, so there might be more ways to connect in the future. One team configuration file can contain many individual profiles, and it can be located in your home directory .zowe folder or added to a Git repository.
You can create and edit a team configuration file in multiple ways such as Zowe CLI. This tutorial will walk you through the steps on how to manage connection profiles by using Zowe Explorer UI.
Prerequisites
- On the client side: Ensure that Z Open Editor and Zowe Explorer VS Code extension are installed in your VS Code.
- On the server side: Check with your system administrator to ensure RSE API or z/OSMF api is installed and which ports it can be accessed on. Often, RSE API is installed on port 7395, sometimes 8195 or 6800, and z/OSMF is often available on port 443 or 10443. Those default ports can be changed. For more information, see installing RSE API and installing z/OSMF API.
Creating a team configuration file
You can create a team configuration file by using Zowe Explorer UI. After the team configuration file is created, it can be used by both Zowe Explorer and Zowe CLI.
Open the Zowe Explorer view in VS Code.
Click the Add profile... plus button in the Data sets, UNIX System Services, or Jobs view.
Click Create a new Team Configuration file.
Choose if you want a file to be accesed globally or just in the current project.
- If you want to access the file in any project, select Global.
- If you want to access the file in the current Git project only, select Project.
Now Zowe Explorer will create
zowe.config.json
in~/.zowe
directory orzowe.config.user.json
inside your repo. This file contains default values and supported extender profile definitions. Because Z Open editor is installed, the team configuration file is created with the RSE profile template.Specify the profiles with your connection details. You can enter common values such as
host
in thebase
profile, which will then be applied to the entire team configuration file.You can hover over each JSON key in the file for explanation of each option.
Specify the values as needed according to your connection type.
- Connect to zOS with RSE API
- Ensure that you can access RSE API using correct port. Swagger API doc should be available on the port, for example,
https://myzos.ibm.com:6800/rseapi/api-docs/
. - If you have
zowe cli
withrse-api-for-zowe-cli
plug-in installed, use thezowe rse check status
command to confirm that RSE API is running on port specified in the profile.
- Ensure that you can access RSE API using correct port. Swagger API doc should be available on the port, for example,
- Connect to z/OS z/OSMF API
- Check out z/OSMF connection troubleshooting guide.
- Connect to zOS with RSE API
Save your changes. Profiles should be ready to be added to each tree view.
In Zowe Explorer, go to the tree of your choice and add the profile by clicking the plus button.
To re-open and update team configuration file, click Add profile... > Edit Team Configuration file.
After you start using the Zowe Explorer tree views, you will be prompted to enter username and password. On the desktop, Zowe Explorer stores encrypted credentials on the user's local system in the local operation system specific way, such as the Keychain on Mac OS. If you are using a different authentication method, see Supported methods of authentication for z/OS using Zowe.
Zowe team configuration file example
{
"$schema": "./zowe.schema.json",
"profiles": {
"zosmf": {
"type": "zosmf",
"properties": {
"port": 443
},
"secure": []
},
"tso": {
"type": "tso",
"properties": {
"account": "",
"codePage": "1047",
"logonProcedure": "IZUFPROC"
},
"secure": []
},
"ssh": {
"type": "ssh",
"properties": {
"port": 22
},
"secure": []
},
"rse": {
"type": "rse",
"properties": {
"port": 6800,
"basePath": "rseapi",
"protocol": "https"
},
"secure": []
},
// common properties can be defined in the base profile insread of defining them in every profile
"base": {
"type": "base",
"properties": {
"host": "myzos.ibm.com",
// reject connection if self-signed certificate is used
"rejectUnauthorized": true
},
// this section will be populated once you are prompted for username and password via Zowe Explorer.
"secure": ["user", "password"]
}
},
"defaults": {
"zosmf": "zosmf",
"tso": "tso",
"ssh": "ssh",
"rse": "rse",
"base": "base"
},
// set to false to not store credentials locally
"autoStore": true
}
Troubleshooting
Error | Resolution |
---|---|
When I click "Add profile", no profiles show up | This might happen when a team configuration file is invalid, for example, when there is a syntax error. Ensure that you team configuration file is saved and is valid. |
Error: Zowe REST Operations API Error: or http(s) request error event called or Error: connect ECONNREFUSED myzos.ibm.com:6800 | In most cases, the error occurs because your RSE API port is wrong.
|
Error: z/OSMF REST API Error: or http(s) request error event called or Error: getaddrinfo ENOTFOUND myzos.ibm.com | If you are using an internal z/OS system behind a firewall, make sure you have connected through the firewall. |
Error: Zowe REST Operations API Error: or http(s) request error event called or Error: self signed certificate or Error: z/OSMF REST API Error: or http(s) request error event called or Error: certificate has expired | If your z/OS is using self-signed certificates, make sure to set "rejectUnauthorized": false . |
Failed to load schema for profile type rse or Failed to load schema for config file /Users/user/.zowe/zowe.config.json: invalid schema file | If you get any schema related error, your zowe.schema.json might be missing, not updated properly, or corrupted. For more information, see sharing team configuration files. |