ISPF Command Table Services & Integration with Third-Party Tools

One of the most powerful features of the Interactive System Productivity Facility (ISPF) is its extensibility. While the standard menus and commands cover a vast array of mainframe tasks, every shop has unique needs. ISPF Command Tables are the mechanism that allows system programmers and developers to define custom commands, modify existing ones, and integrate third-party tools seamlessly into the ISPF environment.

In this comprehensive guide, we will explore how ISPF Command Tables work, how to use the Command Table Utility (Option 3.9), and how to leverage these tables to integrate external tools like file managers, debuggers, and change management systems.

Understanding ISPF Command Tables

At its core, an ISPF Command Table is a lookup database. When you type a command on the Command line (e.g., SAVE, CANCEL, or SWAP) and press Enter, ISPF doesn't inherently know what that text means. It consults a series of Command Tables to find a match.

Each entry in a command table defines:

  • The Verb (the command name you type).
  • The Action to take (e.g., run a program, show a panel, or act as an alias).
  • The Truncation (how much of the command you must type for it to be recognized).

Types of Command Tables

ISPF searches command tables in a specific order to resolve commands. Understanding this hierarchy is crucial for customization and troubleshooting.

  • Application Command Tables (applCMDS): These are specific to the application you are currently running (identified by the Application ID or NEWAPPL). For example, if you are in the ISPF Editor (App ID 'ISP'), ISPF looks in the ISPCMDS table, but specific editor commands might be handled internally or via edit macros. However, custom applications often have their own tables (e.g., XYZCMDS).
  • User Command Tables: Users can define their own personal command tables to create shortcuts for their own workflows.
  • System Command Table (ISPCMDS): This is the global table containing standard commands like SPLIT, SWAP, HELP, and EXIT. It is active for all users.
  • Site Command Tables: Many installations define a site-specific table (often concatenated before ISPCMDS) to enforce site standards or provide global tools.

Using the Command Table Utility (Option 3.9)

ISPF provides a built-in utility for managing command tables. This is Option 3.9 (Utilities > Command Tables).

Accessing the Utility

Navigate to Option 3.9 from the Primary Option Menu. You will be presented with a list of currently active command tables or a prompt to enter a table name.

text
1
2
3
4
5
6
7
8
9
10
11
12
Menu Utilities Compilers Options Status Help ------------------------------------------------------------------------------ ISPF Command Table Utility Option ===> A Application - Process the application command table U User - Process the user command table S Site - Process the site command table T Table - Process a specific table (enter name below) Table Name . . . . ________ (for option T)

Anatomy of a Command Table Entry

When you edit a command table, you see a tabular list of commands. Each row represents one command. Here are the key columns you will define:

1. Verb

This is the name of the command as the user will type it. It must be unique within the table. Examples: MYTOOL, XLATE, ZIP.

2. T (Truncation)

This integer specifies the minimum number of characters the user must type for ISPF to recognize the command.

Example: If Verb is UPDATE and T is 2, the user can type UP, UPD, UPDA, etc., and they will all match UPDATE. If they type U, it will not match.

3. Action

The action determines what happens when the command is matched. The most common actions are:

  • SELECT: Executes an ISPF SELECT service. This is the most powerful action. It can invoke a panel, a command procedure (CLIST/REXX), or a program.
  • ALIAS: Defines an alternative name for another command. The Description field must contain the real command name.
  • PASSTHRU: Passes the command string directly to the underlying application (dialog) without ISPF attempting to process it.
  • NOP: No Operation. The command is recognized but does nothing.

4. Description

Depending on the Action, this field holds different data. For SELECT, it contains the selection string (e.g., CMD(MYREXX)). For ALIAS, it contains the target command.

Integration with Third-Party Tools

Integrating third-party tools (like Debuggers, File Managers, or SCM tools) into ISPF essentially involves creating "hooks" in the command tables. This allows users to invoke these complex tools with a simple command from any ISPF screen.

Scenario: Integrating a Custom REXX Tool

Imagine you have a REXX script named QUICKJOB that submits a standard job for the user. You want users to be able to type QJ from any command line to run it.

Step-by-Step Implementation:

  • Step 1: Open Option 3.9.
  • Step 2: Select 'U' for User command table (or 'S' for Site if you are a system programmer).
  • Step 3: Insert a new line.
  • Step 4: Fill in the fields:
    • Verb: QUICKJOB
    • T: 2 (So QJ works)
    • Action: SELECT
    • Description: CMD(QUICKJOB)
  • Step 5: Save the table.

Now, whenever you type QJ or QUICKJOB on an ISPF command line, ISPF will execute the QUICKJOB REXX script found in your SYSPROC/SYSEXEC concatenation.

Passing Parameters

You often need to pass arguments to your tool. The SELECT action handles this seamlessly.

text
1
2
3
4
5
Verb: FINDUSER Trunc: 4 Action: SELECT Description: CMD(SEARCHU &ZPARM)

In this example, &ZPARM is a system variable that contains everything the user typed after the command verb. If the user types FINDUSER STEVES, the REXX script SEARCHU is called with the argument STEVES.

Common Third-Party Tool Integrations

Many vendor tools use this exact mechanism.

  • Endevor (CA/Broadcom): Often integrated via a command like NDVR which points to a SELECT CMD(ENDEVOR) or similar driver.
  • File Manager (IBM): Uses commands like FM or FMN to invoke the File Manager main menu.
  • Xpediter (BMC): Debugging sessions are often launched via commands added to the ISPCMDS table during installation.

Best Practices for Command Table Management

  • Don't Modify ISPCMDS Directly: If you modify the IBM-supplied system table, your changes will be wiped out during the next system upgrade. Instead, use a Site Command Table or a User Command Table.
  • Use Unique Verbs: Avoid creating commands that conflict with standard ISPF commands (like SAVE or END) unless you specifically intend to override them.
  • Testing: Always test new commands in a User table before promoting them to a Site table affecting all users.
  • Documentation: Keep a record of custom commands. Users can't use tools they don't know exist!

Explain Like I'm 5: Command Tables

Imagine you are in a magic castle (ISPF). You can ask the castle to do things by shouting magic words (Commands).

However, the castle doesn't understand every word in the world. It has a big "Book of Spells" (The Command Table).

  • When you shout "FLY", the castle looks in the book.
  • It finds "FLY" and reads the instruction: "Pick up the user and float them in the air."
  • If you shout "PIZZA" and it's not in the book, the castle just looks at you confused and says "Command not found."

Option 3.9 is like a special pen that lets you write new spells in the book. You can write: "When I say 'SNACK', bring me a cookie." Now, whenever you say SNACK, the castle (ISPF) checks the book, sees your new rule, and brings you a cookie (runs your program).

Frequently Asked Questions

Exercises

Try these exercises to master Command Tables. (Note: You may need access to a sandbox environment or your own user table).

  • Exercise 1: Open Option 3.9 and view the System Command Table (ISPCMDS). Find the entry for the SWAP command. What is its truncation value?
  • Exercise 2: Create a "User" command table. Add a command HELLO that invokes a simple REXX script that says "Hello World".
  • Exercise 3: Create an ALIAS. Make the command BYE an alias for the standard command EXIT.

Test Your Knowledge

1. Which ISPF utility option is used to manage Command Tables?

  • Option 3.1
  • Option 3.4
  • Option 3.9
  • Option 6

2. What is the name of the default system command table?

  • ISPTABLE
  • ISPCMDS
  • SYSCOMMAND
  • ISPPROF

3. Which Action field value indicates that the command should invoke a CLIST or REXX exec?

  • ALIAS
  • SELECT
  • PASSTHRU
  • NOP

4. What does the "Trunc" field specify in a command table entry?

  • The maximum length of the command
  • The minimum number of characters required to identify the command
  • The number of parameters allowed
  • The truncation column for output

5. If you want multiple command names to perform the exact same action, which Action type should you use?

  • SELECT
  • DUPLICATE
  • ALIAS
  • COPY

Related Concepts