z/OS - Group home

Run Operator and Other Commands from ISPF

  

The Problem

All to often we need to get some information from the operating system. We know there is a command to do it yet sadly we cannot remember what it is. I know that happens to me frequently.

What if there was a Partitioned Data Set with many of the z/OS operator commands with the ability to select one, or more, of the commands to execute?

What if the commands in this data set supported symbolics, including the ability to prompt for any non-system symbolics?

And what if you could do more than just operator commands?

The Solution

Fortunately, there is just such a solution available. It is called RUNC, short for Run Command, and is available as an open source tool (see below for where you can download this tool).

RUNC is an ISPF Edit command, otherwise known as an Edit Macro, that performs this magic. The data set can be open using either ISPF Edit or View (View is recommended so you do not accidentally change what works).

This is an example of a section of the z/OS member of the sample PDS provided with the tool:

Commands are selected using a C or S for an individual record, a C# or S# for ‘n’ records and CC or SS for a range of records.

If there are a series of commands that should be performed together then those can be grouped between <START> and <END>  records.

And this is an example of using a symbolic in a command: 

When a symbolic is recognized and it is not one of the supported symbolics then the user is prompted to fill in the value thus:

Having filled in sys1.parmlib in the entry field we get these results in the RUNC report:

As you can see – it helps run us TN3270 session wider than 80 columns. All 3270 emulators support the standard 3270 models (2,3, and 4 are 80 columns wide and 5 is 132 columns). Many emulators support customer terminal sizes – I know several individuals using a 60x160 TN3270 layout (which requires a large monitor, excellent eyesight, or both).

RUNC has a reasonably good tutorial behind it which is accessed by entering RUNC ?.

The set of pre-defined symbolics supported are:

Command Types

RUNC supports several different command types.

 

The Edit, EJES, SDSF, and OMVS commands support ‘stacking’ by separating commands with a ; character.

               For example:  omvs cd /etc;ls -laR

Commands may be continued across multiple records using a + at the end of the record to be continued.

RUNC can be used with PARMLIB members. Here is an example of a BPXPRMxx member:

What this does is instruct the Systems Programmer to run the syntax checker for this member by selecting the 4th record and then using RUNC 3, where 3 instructs RUNC to skip over the 1st three characters to find the command to execute.

The SAMPDOC member of the Samples PDS demonstrates how to use the <DOC> feature of RUNC to display pop-up instructions for the user of a RUNC member. This can be very helpful when there are tasks that need to be performed by less experienced individuals, or experienced individuals who do it infrequently.

A great use for RUNC with the <DOC> feature is to write scripts for use in implementing changes or for disaster recovery procedures.

Where to Find RUNC