Tutorial: Creating and getting started with your workspace

Learning objectives

This tutorial does not cover all capabilities of IBM® Wazi for Dev Spaces but demonstrates how convenient the process of initiating the development environment for z/OS® application developers is by using IBM Wazi for Dev Spaces. It also introduces you to some popular features of IBM Wazi for Dev Spaces. You can then have a rough idea about the modern z/OS application editing experience, which enables you to code applications from any machine without any local environment configurations.

Tutorial scenario

By completing this tutorial, you will know how to create and set up a workspace using IBM Wazi for Dev Spaces. You can then try out the modern editing experience for IBM Z® enterprise languages including COBOL, PL/I, HLASM, REXX, and JCL with an in-browser IDE. In addition to local files, you will also learn how to access z/OS system resources, such as COBOL programs in MVS™ or z/OS UNIX System Services, directly from your workspace by using Zowe™ Explorer, which is included in the IBM Wazi for Dev Spaces stack.

Time required

It takes approximately 15 - 20 minutes to complete this tutorial.

Audience

The z/OS application developers who want to explore a modern z/OS development experience.

Prerequisites

The cloud operations administrator in your organization installed IBM Wazi for Dev Spaces according to Installing Wazi for Dev Spaces on a Red Hat® OpenShift® cluster and provided you with the url and an account to log on to this OpenShift cluster. After you log on, you will see OpenShift Developer Perspective.

Procedure

1. Navigate to the IBM Wazi for Dev Spaces Dashboard

In the OpenShift Developer perspective, click the Applications icon in the toolbar. Under IBM Applications, select IBM Wazi for Dev Spaces, which will open the Dev Spaces Dashboard.

2. Create a workspace using the IBM Wazi for Dev Spaces stack

  1. Click Create Workspace in the bar on the left. This page contains tiles under Select a Sample of all the different stacks you can choose.

  2. Click the tile for the IBM Wazi for Dev Spaces stack. A workspace will be created with a sample repository called zopeneditor-sample.

After the workspace is created successfully, you should see the sample repository by clicking the Explorer view.

3. Browse source files of project zopeneditor-sample

Now that your Wazi for Dev Spaces instance is up and running, you can explore what the Wazi for Dev Spaces stack offers. This workspace instance comes with a sample project named zopeneditor-sample.

Within the zopeneditor-sample directory, you can see several folders such as COBOL, COPYBOOK, INCLUDES, JCL, PLI with code samples in these different languages. For details about the sample files and their use cases, open and preview the README.md file.

The following steps walk you through some features of the editor with the COBOL file as an example.

  1. Expand the COBOL folder and select the file SAM1.cbl to open it. The COBOL program is opened in the editor, and you can immediately see the syntax highlighting.

  2. On the left below the file explorer view, you see a section labeled Outline. Expand it to see the COBOL program's Outline view. If you do not see the Outline section, use the menu command View > Open View.. and then select Outline in the pop-up list. Then, you can click entires in the Outline view and the editor navigates to the section in the source code allowing you to quickly navigate the program.

  3. Try some of the other language features. For example, you can right-click any variable and select Peek > Peek References from the pop-up menu. The editor then shows you all the places where the variable is used inside the program file.

  4. Write some code using ctrl-space to bring up the code completion options menu.

For more information about the editor's features, see Making code changes.

4. (Optional) Set up Zowe CLI profiles to connect to z/OS

To take full advantage of all the features in the stack,you need access to a z/OS system with z/OSMF or RSE API configured. Zowe CLI team configurations can be used to connect to z/OS. This section explains how to do this in IBM Wazi for Dev Spaces via the command line.

Make sure that you have a z/OS system that is reachable from your OpenShift cluster. If you are using IBM Cloud®, you can try using a system provided by the IBM Z Xplore learning site, which you can sign up for on the IBM Z Xplore Registration page.

Complete the following steps to create a Zowe CLI profile:

  1. Follow the steps described in Configuring Zowe Explorer to change the Remote setting zowe.security.secureCredentialsEnabled to false.

  2. Click the zowe view icon on the left to switch to the Zowe Explorer activity group.

  3. In the Data Sets view, click the + icon at the right (hover over the view's title bar).

  4. In the drop-down, select + Create a New Team Configuration File.

  5. In the next drop-down, select Global: in the Zowe home directory. An editor with a json form opens.

  6. Fill in the content with the IP address and ports to your system.

  7. Save the form.

For more details about Zowe CLI configurations files, see Zowe docs website.

The resulting file might look like this:

{
    "$schema": "./zowe.schema.json",
    "profiles": {
        "ssh": {
            "type": "ssh",
            "properties": {
                "port": 22
            }
        },
        "rse": {
            "type": "rse",
            "properties": {
                "port": 6803,
                "basePath": "rseapi",
                "protocol": "https"
            }
        },
        "base": {
            "type": "base",
            "properties": {
                "host": "mySandbox.company.com",
                "rejectUnauthorized": false
            }
        }
    },
    "defaults": {
        "ssh": "ssh",
        "rse": "rse",
        "base": "base"
    },
    "autoStore": true
}

5. (Optional) Explore z/OS using Zowe Explorer in your workspaces

  1. Right-click the rse entry, select Login to Authentication Service, and wait for a dialog to inform you that logon was successful. If you received an error, check that the information in your team configuration file is correct and that you used a valid username and password.

  2. Click the Search icon (magnifying glass) next to that rse entry and select Create a new filter to enter your username and find the SYS1.MACLIB data set. The data set is shown in the view.

  3. Expand the SYS1.MACLIB data set and click the member ABEND. The assembler macro file is opened and shown in the editor with the HLASM editor. The Outline view is populated with content from this file.

  4. To create a new data set, you can right-click your profile name, select Create New Data Set, and follow the prompts to create a Partition Data Set.

  5. Right-click the new created data set and select Upload Member.. from the menu. Select a file to upload in the prompt such as COPYBOOKS/TRANREC.cpy.

  6. After the new member is added to your data set, click on it to open it in the editor.

  7. To add the same connection profile to the Unix System Services or JOBS view, expand the view and click the + icon that appears when you hover your cursor over the view's header. Then, select the connection from the drop-down list. Now you can run similar search queries for files on the Unix System Service or Jobs.

For more information about using the Zowe Explorer views to interact with z/OS, see Using the Zowe Explorer views.

What's next

  • You can continue exploring Wazi for Dev Spaces using the zopeneditor-sample repository. Check out the documentation links in the Creating a workspace topic to dive deeper and learn more about the available features.

  • Ready to start using Wazi for Dev Spaces with your own project? Follow the steps to create a workspace with your own Git repository.