Zowe CLI: “Hello World” w/REXX
{Core}
The first blog I ever wrote was Mainframe Assembler & Zowe: “Hello World” Example. Some years later, I see that there are a few issues with it:
- it included references to HLASM (which not many folks know or use)
- it is 6 minutes long (which is 4 minutes too many)
- it is too complicated
To fix these previous wrongs, below is a second attempt at “Hello World” using REXX 😃.
Step1: Install & Config
The complete “getting started” doc is here. Assuming you have access to z/OSMF REST APIs, the important parts are to:
- install Node.js
- install The Open Mainframe Project’s Zowe CLI:
npm install @zowe/cli -g
- create a project folder run
zowe config init
there
The last part creates a file, zowe.config.json
, that you edit to set proper host/port information:
After saving the file, you can test your connection via something like zowe jobs list jobs
.
If you get a list of jobs or empty response, you’re configured. If you get errors, you might need to troubleshoot your connection info and access.
Step 2: Create a REXX Program
Create a REXX program on your workstation adjacent to the zowe.config.json
:
Step 3: Upload Your REXX Program
zowe files upload ftds ...
is used to upload a local file to a data set on z/OS:
Step 4: Run Your Program
zowe tso issue command ...
is used to run REXX:
Bonus Information!
For anyone who wants to see the ability to run REXX PDS members directly from Zowe Explorer leveraging the TSO exec command please upvote the issue https://github.com/zowe/vscode-extension-for-zowe/issues/1784!
Summary
You can learn more about editing and executing REXX here and here!
Finding out more
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-cli or #zowe-onboarding. If this is your first time using the Open Mainframe Slack Channel register here.
Zowe is owned and managed by the Open Mainframe Project which is a Linux Foundation project.