An open-source, native protocol for z/OS mainframe operations via SSH with minimal server-side configuration.
- Node.js & npm - required to build client packages
- Golang - optional but recommended for type generation and linting
- IBM C/C++ for z/OS -
xlclang
andxlclang++
- GNU Make for z/OS -
make
a.k.a.gmake
(nativemake
is not supported) - IBM Open Enterprise SDK for Go - Golang for z/OS
- Clone this repository and run
npm install
to install project dependencies. - Create a config file by copying
config.example.yaml
toconfig.yaml
. Update the properties in the file for your environment. - For a quick start, run
npm run all
which performs the following tasks:z:upload
- Upload source filesz:build
- Build native binaries on z/OSz:artifacts
- Download build artifactsbuild
- Build client packages locally
Tip
If you don't have a z/OS build environment, you can download prebuilt binaries with npm run download
(this requires the GitHub CLI). Then skip to Step 3.4 and run npm run build
to build client packages.
To run the VS Code extension, open the repository in VS Code and launch the "Run Extension" debug task. Then you can use SSH profiles in Zowe Explorer.
See the VSCE readme for more details about using the VS Code extension.
To install the CLI plug-in from source, run zowe plugins install ./packages/cli
. Then run zowe zssh --help
to see available commands.
See the CLI readme for more details about using the CLI plug-in.
To run the zowex
CLI on z/OS, connect to USS shell (OMVS) and cd
to c/build-out
inside the deploy directory. Then run zowex
, or zoweax
for commands that require APF authorization.
See the native readme for more details about building the native components.
Run npm run z:rebuild
to rebuild server code after editing files in the native
folder. See Troubleshooting to debug common build issues.
Run npm run build
to rebuild client code after editing files in the packages
folder.
To test server changes without having to download artifacts and re-deploy them each time, you can define serverPath
property in your SSH profile in zowe.config.json
. It should point to the <deployDir>/golang
folder that contains the zowed
binary. See example below.
"profiles": {
"ssh_dev": {
"type": "ssh",
"properties": {
...
"serverPath": "~/zowe-native-proto/golang"
}
}
}
To package client components with native binaries bundled, run npm run z:artifacts && npm run package
which generates packages in the dist
directory.
Tip
See the list below for more useful scripts like watch
for incremental build.
We use a custom build tool for interacting with z/OS that defines the following NPM scripts:
Command | Description |
---|---|
z:artifacts |
Download native binaries and package them with clients |
z:build |
Run make and go build on z/OS to build native binaries |
z:clean |
Run make clean on z/OS to clean build targets |
z:delete |
Delete all files from deploy directory |
z:package |
Create server PAX artifact in dist directory |
z:rebuild |
Upload and Build combined in one command |
z:test |
Run automated tests for native components on z/OS |
z:upload |
Upload source files from native directory to z/OS 1 |
z:watch |
Detect changes to files in native directory and upload/build 2 |
- To deploy a single file or directory:
npm run z:upload -- c/zowex.cpp
- To watch server and client code at the same time:
npm run watch:all
Tip
To deploy and build on a different LPAR, you can define additional profiles in config.yaml
and use them by changing the activeProfile
property. For example:
activeProfile: another
profiles:
default:
# Profile properties...
another:
sshProfile: ssh2
deployDir: /tmp/zowe-native-proto
Click on a component in the diagram below to learn more about it:
graph LR
subgraph Client
sdk[Node.js SDK Package]
cli[Zowe CLI Plug-in]-->sdk
vsce[VS Code Extension]-->sdk
other[<My Custom App>]-->sdk
end
subgraph z/OS Server
ioserver["Golang I/O Server<br>(Middleware)"]<-->zowex["C++ CLI Binary<br>(Backend)"]
sdk<-->|SSH|ioserver
subgraph Mainframe Resources
ds[Data Sets]
uss[USS Files]
jobs[Jobs]
end
zowex-->ds
zowex-->uss
zowex-->jobs
ioserver-->uss
end
click sdk "https://github.com/zowe/zowe-native-proto/blob/main/doc/client/architecture.md#sdk-package"
click cli "https://github.com/zowe/zowe-native-proto/blob/main/doc/client/architecture.md#cli-plug-in"
click vsce "https://github.com/zowe/zowe-native-proto/blob/main/doc/client/architecture.md#vs-code-extension"
click ioserver "https://github.com/zowe/zowe-native-proto/blob/main/doc/server/ioserver_architecture.md"
click zowex "https://github.com/zowe/zowe-native-proto/blob/main/doc/server/zowex_architecture.md"