Helpful commands to manage RD&T z/OS instance from the linux command line

Off
Strongback Consulting

If you are using the Rational Development and Test product, you are likely in one of two camps: 1) you are a systems programmer with minimal linux expertise, or 2), you are a linux admin with nominal z/OS experience. Certainly there are people who are gurus at both, but those are rare birds indeed.

You can send commands to the z/OS via a Linux command line “oprmsg“. This sends commands to the z/OS operator console, and logs output to the console log. If you are unfamiliar with the z/OS operator console, you can limp along using the console log which is a simple text file in the linux file system.  I’ve found that I frequently have to enter the same few commands in a series. As such I’ve created some simple shell scripts to make it simpler. These shell scripts should be added to the /home/ibmsys1/bin directory. That way they can be called from anywhere. I did have to update the .bashrc file to ensure this folder was included in the path variable (which is what allows you to call it from anywhere).

The first command activates the console for MVS commands. Name it activate.sh
#!/bin/bash
# Activate operator message console via command line
oprmsg ‘vary cn(*),activate’
tail ~/z1090/logs/log_console_*

The next script will show any pending system messages. Name it pending.sh.
#!/bin/bash
# Show all pending messages
oprmsg ‘d r,l’

Then, we can show all active tasks. This is highly useful when doing a system shutdown. You do not want to call the awsstop task until all but the JES is running. IF you do it while CICS and VTAM are running, you are very likely to corrupt some datasets. Name this one showjobs.sh
#!/bin/bash
# Show all active jobs
oprmsg ‘d j,l’
tail ~/z1090/logs/log_console_*
Note that the first line of a shell script should refer to the command line interpreter, which in this case is bash. Once you get the gist of this, you can add others as you see fit. For example, if you start up the RDz host daemon separately via command (rather than via the z/OS ipl process), you can add that as follows:
#!/bin/bash
# Show all active jobs
oprmsg ‘s jmon’    #Start Job MOnitor
oprmsg ‘s lockd’   #Start LOCK Daemon
oprmsg ‘s rsed’    #Start Remote System Explorer Daemon
tail ~/z1090/logs/log_console_*

Comments are closed.