Browser UI for z/OS® System Display and Search Facility (SDSF) based on Zowe CLI.

Frans Beyl
Zowe
Published in
4 min readApr 13, 2021

{Core} Imagine a mainframe browser UI using only z/OSMF rest API, TSO and SDSF REXX on mainframe side. Here’s now with Zowe CLI and jquery libraries from a PC and z/OSMF REST APIs on z/OS.

Sysprogs may find themselves working on highly secured systems where open-source software isn’t (yet) tolerated which may rule out parts of Open Mainframe Project’s Zowe,z/OS components being installed as they are open-source. However the same isn’t true for the zowe command-line interface since it runs on workstation and connects to z/OS by using it’s z/OSMF rest API.

Ever since early 2019 when I first heard about Zowe I was excited about the idea to finally have a GUI for z/OS. At the same time I discovered that not only would it become possible to connect from browser but also automating mainframe actions from the workstation command-line was reality delivered by Zowe CLI.

SDSF is the System Display and Search Facility many sysprogs are used to for looking at job status through its eponymous command. Time Sharing Option, or TSO, allows commands to be executed to do a wide range of mainframe tasks, and REXX (aka Restructured Extended Executor) is the language of choice of many sysprogs to script and automate z/OS tasks. Combining the security and power of these, with the agility and flexibility of the open source Zowe command line interface (CLI) is the task I set myself.

What does it look like

Following recording shows the server in action on Linux with Firefox connected to IBM zowe tutorial system. For this example I used the announced local zowe daemon which outputmessages are in the top-left terminal. The local node.js server’s messages are visible in the right-top terminal while the browser page fills the rest of the window.

Mainframe software

z/OSMF rest has a tso api to start, ping, issue command, send message and stop a tso session.

TSO/SDSF has a REXX environment to issue SDSF commands, access tabular panels and convert the data to json format to make it widely accessible. You can find all about it in ‘Using SDSF with the REXX programminglanguage’

REXX can read from terminal and write to terminal as well as write to dataset. A simple rexx that reads request from terminal, executes corresponding sdsf command, writes to-json converted data in dataset and writes a message to the terminal telling dataset is ready is all that needs to be set up on mainframe.

Workstation software

Zowe CLI is a node.js package and node.js has a built-in HTTP module which can serve a local HTML page and respond to ajax calls from within that page. Even more node.js has a builtin child_process module which uses shell to execute commands and return buffered output.

Browser with javascript enabled and access to internet cdn’s for bootstrap 4,0, jquery, datatables.

How it all comes together

This should be enough to create a node http/html server that starts listening on port, starts tso session on z/OS and starts in that tso session an sdsf rexx waiting for input from terminal.

Once the primary page is rendered by browser user can click buttons that triggers ajax call to our local server who converts these clicks into zowe cli tso send commands executed in child_process.

The z/OSMF tso rest API takes the request and passes it to the tso terminal where sdsf rexx is waiting to read from terminal. Once the request read it is converted into sdsf isfexec command and the resulting tabular answer is converted to json and written to member in pdse. The rexx then wites outputmessage to the terminal and it is returned to zowe cli by z/OSMF tso rest API. The child_process returns ok and the server starts downloading the member from pdse using zowe download command finally responding the json to the ajax call.

Data is then put into a jquery datatable to present to user with some order and filter functionality.

From here on

I merely hope this shows the possibilities that are at our fingertips now, sdsf can certainly do a lot more as well as other software available for z/OS with rexx environment. I’m planning to try similar with sysview, file manager, …

Sdsf also has a rich set of java classes so I imagine a java app doing similar can (should) be published thru zowe apiml (might even be done yet) …

If you like to dig into this example all code is available here.

“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.”

--

--