Zowe CLI: “Hello World” w/REXX

Dan Kelosky
Zowe
Published in
3 min readMay 19, 2023

{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:

The last part creates a file, zowe.config.json, that you edit to set proper host/port information:

Port 1443 is this port of a z/OSMF REST API instance to connect to in my case

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:

“Hello world” REXX program

Step 3: Upload Your REXX Program

zowe files upload ftds ... is used to upload a local file to a data set on z/OS:

Upload successful

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!

- Joe Winchester

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.

--

--

Dan Kelosky
Zowe
Writer for

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