Zowe SDKs: Build z/OS Connected Applications Faster

Andrew Harn
Zowe
Published in
4 min readNov 30, 2020
Zowe Opens Up the Mainframe Ecosystem

{Core} For some time, the Open Mainframe Project’s Zowe has been opening up the mainframe ecosystem, allowing end users to leverage the mainframe in new and powerful ways. One of the core offerings from Zowe, the Zowe CLI, allows users to interact with mainframe files, datasets, jobs, consoles, and more, all from a simple command line interface on their workstation. This powerful tool allows users to automate code scans, monitor jobs, modify datasets, and so much more. While this functionality caters to end users and their automated Continuous Integration / Deployment processes, a command line interface is not always convenient, even when the functionality it enables is. What if developers need to integrate the functionality enabled by the Zowe CLI into their own tools and applications, or want to develop their own interface tailor-fit to their organization’s needs?

Before now, the solution to this problem was to import the Zowe CLI as a dependency in your Node.js project and call the APIs. This solution was functional, but had a few drawbacks; most notably, it locked third party developers into using Node.js, and forced developers to import code that was either not useful to third parties (such as the CLI command handlers), or was not needed in their project. Now, there is a much better solution.

Introducing the Zowe SDKs

Stop spending hours writing code from scratch with the Zowe SDKs

As part of the initiative to increase the adoption and capabilities of Zowe, Software Development Kits (SDKs) have been created for Python, Swift, and Node.js. These SDKs enable developers to integrate some of the most used functionality of the Zowe CLI into their own projects with minimal development overhead.

Prerequisites

With the exception of the z/OS USS package in the Node.js Zowe SDK, all of the SDKs rely on the z/OSMF REST endpoints to communicate with the mainframe.

Python SDK

The Python SDK is compatible with Python 3, and can be found on GitHub, PyPi, and on Zowe.org. The SDK can be installed by running the pip install zowe command to install all of the packages. Alternatively, running the
pip install zowe.<subpackage>_for_zowe_sdk command allows developers to install sub-packages of the SDK, decreasing the size of a project’s dependencies. The sub-packages include:

zowe_core
zos_console
zos_files
zos_jobs
zos_tso
zosmf

Full documentation for installation and use of the Python SDK can be found on Read the Docs.

Swift SDK

The Swift SDK is available on GitHub as a single package, and can be used to develop applications for iOS, iPadOS and macOS. Examples for usage of the Swift SDK can be found in the quick start documentation, found here. More in-depth examples can also be found individually for z/OS files, z/OS jobs, and z/OSMF. Documentation on how to import the SDK to your Swift project can be found here.

Node.js SDK

The Node SDKs are available on GitHub, NPM, and Zowe.org. The SDKs are contained in multiple packages in order to reduce the size of a project’s imports. The SDK packages include:

@zowe/provisioning-for-zowe-sdk
@zowe/zos-console-for-zowe-sdk
@zowe/zos-files-for-zowe-sdk
@zowe/zos-jobs-for-zowe-sdk
@zowe/zos-tso-for-zowe-sdk
@zowe/zos-uss-for-zowe-sdk
@zowe/zos-workflows-for-zowe-sdk
@zowe/zosmf-for-zowe-sdk

In order to use any of the above Node SDKs, the @zowe/core-for-zowe-sdk and @zowe/imperative packages must be installed in the project. The core package provides common functions and utilities to the other SDK packages in the project, reducing duplication.

A sample package.json for a project that uses the z/OS Files SDK

Documentation on how to use the Node SDKs can be found in the Readme on GitHub. This documentation covers some of the basic uses of the SDKs, as well as information on how to retrieve a user’s CLI profile for use with applications. Examples on how to effectively leverage the SDKs are readily available in the individual SDK Readme files linked here, as well as in the Zowe SDK Sample Scripts repository on GitHub.

Full API reference documentation with information on all available endpoints for the Node and Python SDKs can be found on Zowe.org. Offline installation packages of the Python and Node.js Zowe SDKs can also be downloaded from Zowe.org here.

Contributing

Contributions are welcome and appreciated for all of the Zowe SDKs. Contribution guidelines for the Node SDKs can be found here. At the time of writing this article, contribution guidelines have not been established for the Python and Swift SDKs. Up to date documentation on contribution guidelines for the various SDKs can be found on Zowe.org.

Further Reading

If you enjoyed this blog, checkout more Zowe blogs here. Or, ask a question and join the conversation on the Open Mainframe Project Slack Channel #Zowe-dev, #Zowe-user, or #Zowe-onboarding. If this is your first time using the OMP Slack channel, register here.

--

--

Andrew Harn
Zowe
Writer for

Software Engineer at Broadcom’s Mainframe Software Division. Open Source contributor to the Open Mainframe Project’s Zowe.