{Core} If you use The Open Mainframe Project’s Zowe Explorer and cannot perform some mainframe operation directly, consider incorporating Zowe CLI into your workflow. For example, at the time of writing this, you cannot run unix commands through the Zowe Explorer UI.

Here we’ll look at a few examples of how the tools can work together.

Running a Shell Script

Let’s say you have a shell script under z/OS Unix System services, echo.sh, which contains:

echo hello $1

When you run it, it prints the hello + the input argument:

Run via SSH connection to USS

Integrated Terminal

Zowe Explorer lets you create and edit files like this directly, but you can…


Zowe Client SDK for Node Example

{Core} The Open Mainframe Project’s Zowe Client SDK for Node.js is a node package manager (npm) package that you can include in a development / automation project. It handles the details of loading profiles along with calling the right mainframe REST API endpoints.

Here we’ll get setup and build a short program that reads mainframe connection info, extracts credentials, and then calls to get a list of z/OS jobs.

Initialize a Project

To get started, create a directory and initialize a package.json:

mkdir hello-zowe-sdk
cd hello-zowe-sdk
npm init -y

Add zowe dependencies:

npm install --save @zowe/imperative@next @zowe/zos-jobs-for-zowe-sdk@next @zowe/core-for-zowe-sdk@next @zowe/zosmf-for-zowe-sdk@next

Add dev dependencies:

npm…


{Core} For the next major version of Zowe CLI — we plan to add the ability to run it in daemon mode for faster response time.

Definition

First, daemon is a:

(noun)

program that runs continuously and exists for the purpose of handling periodic service requests that a computer system expects to receive.

Also, it’s pronounced this way:

Not “day-muhn”

Why

Sometimes Zowe CLI commands are slow depending on operating system, system configuration, and other running software (like antivirus). On my system, zowe -h can take nearly 3 seconds to run:


{Core} Zowe CLI and ZOA Utilities can each help with automating mainframe development workflows; combining them and using them together can help even more.

Here we’ll look briefly at ZOA Utilities and Zowe CLI to describe a bit about each one and then show an example of calling ZOA Utilities from Zowe CLI.

ZOA Utilities

From the ZOA Utilities site:

IBM® Z Open Automation Utilities (ZOA Utilities) fills in the gap by providing the underlying runtime to support executing automation tasks on z/OS via Java, Python, and shell commands.

ZOA Utilities has many utilities for working with data sets, z/OS jobs, and…


{Core} In a previous blog, we’ve seen how you can call low-level services (written in Metal C /HLASM) from Java. Here, we’ll do something similar but from Node.js / JavaScript.

JavaScript code writing to a z/OS log via WTO

Background / Prerequisites

Before getting started, you’ll have to go through the steps to install Node.js and build a native “Hello World” Node.js application for z/OS. Petr’s blog covers this perfectly.

Disclaimer

The approach below is admittedly a little obscure (using both the njsc++ and xlc compilers). Hopefully, this blog will be updated in the future, showing a cleaner method of calling HLASM from JavaScript.

N-API Hello World

The end of Petr’s blog cover’s an N-API example.


{Core}The Open Mainframe Projext’s Zowe offers modern interfaces to interact with z/OS and allows you to work with z/OS in a way that is similar to what you experience on cloud platforms today.” — zowe.org

One modern way to interact with cloud platforms is through Software Development Kits, (e.g aws, firebase, etc…). Although we (Zowe) don’t yet meet the full definition of SDK, we’re heading there.

The goal of a Zowe SDK is to make the Open Mainframe Project’s Zowe services (and by extension, the mainframe) easier to use by providing reusable code for common mainframe operations in popular…


As setup for a future Zowe / mainframe topic, we’ll look at the basics of writing Git Hooks.

Worst hook ever

Git Hooks Defined

Git is an extensible version control system . One way to extend git is through writing hooks which is just some extra code that you write which is called from git (you don’t invoke your hooks directly).

Hooks can be written to enforce certain site-specific standards or to do other processing behind-the-scenes.

Hooks are client or server side and usually have a pre- or post- flavor; meaning they run before or after a git operation. …


CA SYSVIEW Display — Intentionally caused high CPU (for a change 😄)

Performance Testing Take #2

{Ecosystem}A colleague of mine, Petr Plavjaník, wrote an excellent article around load and performance testing mainframe applications. Petr shows how to use Zowe CLI (brightside — bright — in the article) to START a mainframe [web] service and then use taurus to load test it.

Here, we’ll show how to do nearly the exact same thing — except we’ll use a different tool: autocannon.

Taurus is a great tool, and we use it internally. The point here is to highlight the range of tools made available with a Zowe-approach.

Zowe Is Not Opinionated

Zowe offers modern interfaces to interact with z/OS and allows you…


{Core} Building on how to run interactive TSO commands (and Rexx), we’ll look how to create a script that wraps TSO commands to “restore” (or “unarchive” or “recall”) a z/OS data set.

In the future, restoring data sets will be more seamless through the Zowe CLI, but for now, it serves as a way to demonstrate how to script TSO commands.

Archived Data Sets

Archived data sets are not immediately accessible for viewing. You must “restore” (in CA DISK language) them first.

Archived data sets via CA DISK

Green Screen Manual Restore

You can request to restore a data set by browsing or viewing it and responding to prompts:


{Core} Here we’ll look at a couple of example programs written in Rexx, and show how you can invoke them from the Zowe CLI.

Rexx

Rexx is an interpreted programming language that’s commonly used within z/OS.

I won’t attempt to describe much about Rexx language itself other than to say that it is a powerful and popular language for z/OS. You can even use it make text-based games on z/OS!

A talented colleague of mine, coyote time, created a Rexx Yahtzee game to help him learn the language:

Yahtzee written in Rexx 😃

“Hello World”

To start, we’ll look at a simple Rexx program to print a message…

Dan Kelosky

Likes programming/automation in mainframe (assembler, C/C++), distributed (Node.js), and web development (Firebase, Angular).

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store