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 APIopen in new window and installing z/OSMF APIopen in new window.

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.

  1. Open the Zowe Explorer view in VS Code.

  2. Click the Add profile... plus button in the Data sets, UNIX System Services, or Jobs view.

  3. Click Create a new Team Configuration file.

  4. 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 or zowe.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.

  5. Specify the profiles with your connection details. You can enter common values such as host in the base profile, which will then be applied to the entire team configuration file.

  6. You can hover over each JSON key in the file for explanation of each option.

  7. 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 with rse-api-for-zowe-cli plug-in installed, use the zowe rse check status command to confirm that RSE API is running on port specified in the profile.
    • Connect to z/OS z/OSMF API
  8. Save your changes. Profiles should be ready to be added to each tree view.

  9. In Zowe Explorer, go to the tree of your choice and add the profile by clicking the plus button.

  10. To re-open and update team configuration file, click Add profile... > Edit Team Configuration file.

  11. 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

ErrorResolution
When I click "Add profile", no profiles show upThis 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:6800In most cases, the error occurs because your RSE API port is wrong.
  • Ensure you 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 with rse-api-for-zowe-cli plugin installed, use the following command to confirm RSE API is running on port specified in the profile: zowe rse check status.
Error: z/OSMF REST API Error: or http(s) request error event called or Error: getaddrinfo ENOTFOUND myzos.ibm.comIf 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 expiredIf 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 fileIf 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.
Last Updated:
Contributors: KRISTINA MAYO, Chun Hong Zheng, Peter Haumer