The Linux Foundation Projects
Skip to main content
Blog | COBOL Programming Course | Mentorship

Mentorship: Project Update: Enhancing COBOL Programming Course with CI/CD and Zowe V3

By | August 29, 2024
COBOL programming course - mentorship

Written by Rituraj Mahato, Vellore Institute of Technology, Vellore and Ali Mohamed, University of Western Ontario.

As part of the Open Mainframe Project’s Summer 2024 Mentorship Program, our team is focused on enhancing the COBOL Programming Course by integrating modern DevOps practices, including Continuous Integration and Continuous Deployment (CI/CD). Our mentorship, guided by industry experts Sudharsana Srinivasan from IBM, Michael Bauer from Broadcom, and Ashis Naik Kumar, aims to provide learners with a comprehensive and updated learning experience.

Key Milestones Achieved:

ZOWE CLI v3 – Rituraj

Updating the COBOL Programming Course to take advantage of the latest improvements that will be included in the September release of Zowe V3 was one of the objectives of our project. We had make sure that we provide learners with an error-free learning experience.

Initially, I used the most recent pre-release version of Zowe Explorer and Zowe CLI to identify issues and changes that were introduced while going through the course myself.  I already had hands-on experience with Zowe on Microsoft’s Visual Studio Code, thanks to my prior learning on the IBM Z Xplore platform, which helps learners acquire practical mainframe skills.

I visited the IBM Z Xplore platform and tackled its challenges as a revision of my mainframe skills, whether it was about using certain commands in Zowe or understanding the files generated after submitting a JCL to the mainframe. While exploring the course, I ensured that I marked every small detail I could find while trying the course myself while using the pre-released version of Zowe V3.

I created a document detailing my observations and proposed changes to the COBOL Programming Course, visit here to learn more.

Github Actions and Automation – Ali

Our initial goals were to use Jenkins for CI/CD, which led us to attempting to run Jenkins on Linux ONE Community Cloud instances as a testing ground for these functions. After some conversations with some IBM Z SMEs, we found out that GitHub Actions will be a better option for automation and it would be easier to implement for us and later learners. Its more widespread use makes it a better suited devops platform for the course. Based on this, I created a repo at https://github.com/alim395/zoweAutoTest, and created the following scripts:


Zowe-cli-plugin.yml

zowe_operations.sh

This YAML file defines a GitHub Actions workflow named “Zowe CLI Operations”. Here’s a summary of what it does:

  1. Trigger:
    • Runs on push events to the main branch and on pull requests to the main branch.
  2. Job Setup:
    • Uses an Ubuntu latest runner.
  3. Steps: 
    • a. Checkout: Retrieves the repository code. 
    • b. Node.js Setup: Installs Node.js version 18. 
    • c. Zowe CLI Installation: Installs the Zowe Command Line Interface globally.
    • d. Script Preparation: Makes zowe_operations.sh executable. 
    • e. Zowe Operations:
      • Runs zowe_operations.sh, which:
        1. Converts the username to lowercase.
        2. Checks for and creates if necessary a specific USS directory.
        3. Uploads local files to this USS directory.
        4. Verifies the upload.
      • Uses environment variables for Zowe configuration (host, port, credentials, etc.). 
    • f. COBOL Check:
      • Connects to USS via SSH.
      • Navigates to the cobolcheck directory.
      • Sets execute permissions on specific files.
      • Runs a COBOL check on a program named NUMBERS.
      • Copies the result to a dataset named after the user.

The workflow uses GitHub Secrets (ZOWE_USERNAME and ZOWE_PASSWORD) for secure credential management. It automates a series of z/OS development tasks, including file transfers, permission settings, and COBOL checks, leveraging Zowe CLI for mainframe interactions. The zowe_operations.sh script handles the initial setup and file transfer to the mainframe, preparing the environment for the subsequent COBOL check operation.

Future Goals:

Github Actions and Automation – Ali

One of the key objectives for future development is to further automate the process by extending the current workflow by incorporating the submission of jobs using JCL (Job Control Language) files. This enhancement aims to achieve the following:

  1. Full Automation: By submitting JCL files, we can automate complex mainframe operations that currently require manual intervention or multiple steps.
  2. Standardization: We can create standardized JCL templates for common operations, ensuring consistency across different processes.
  3. Error Handling: Implement robust error checking and handling for job submissions, improving the reliability of our automated processes.
  4. Integration with Existing Workflow: Seamlessly incorporate JCL submission into our current GitHub Actions workflow, maintaining a cohesive automation strategy.

This should also lead into the 2nd and 3rd lab of Chapter 4, to allow automation of unit testing.

 

Stay tuned

Mentees will be blogging about their experiences. Stay tuned here and the Open Mainframe Project social channels for updates.