Command tables allow you to extend ISPF with custom commands that execute REXX scripts, CLISTs, display panels, or perform other operations. Understanding command tables helps you add user-defined commands to ISPF, creating a more customized and efficient environment. This tutorial covers command table structure, creating command tables, defining custom commands, and best practices.
Command tables provide a powerful way to extend ISPF functionality. By defining custom commands, you can create shortcuts, automate operations, and build integrated workflows. Learning command tables enables you to tailor ISPF to your specific needs. This tutorial provides practical guidance for command table development.
Command tables define custom commands for ISPF.
Command tables are:
Command tables are stored in:
Command tables use specific syntax to define commands.
A basic command table includes:
Command definitions specify:
Example command table:
1234MYCMD REXX('USERID.REXX(MYSCRIPT)') MYCLIST CLIST('USERID.CLIST(MYCLIST)') MYPANEL PANEL(MYPANEL) MYEDIT EDIT DATASET('USERID.SOURCE.COBOL')
Step-by-step command table creation.
To create a command table:
Write command definitions:
Save the command table:
Commands can execute different types of actions.
Commands that execute REXX scripts:
12MYREXX REXX('USERID.REXX(MYSCRIPT)') MYREXX2 REXX('USERID.REXX(SCRIPT2)') 'PARM1' 'PARM2'
REXX commands execute REXX scripts, optionally passing parameters.
Commands that execute CLISTs:
12MYCLIST CLIST('USERID.CLIST(MYCLIST)') MYCLIST2 CLIST('USERID.CLIST(CLIST2)') 'PARM1'
CLIST commands execute CLIST procedures with optional parameters.
Commands that display panels:
12MYPANEL PANEL(MYPANEL) MYMENU PANEL(MYMENU)
Panel commands display ISPF panels.
Commands that perform actions:
12MYEDIT EDIT DATASET('USERID.SOURCE.COBOL') MYBROWSE BROWSE DATASET('USERID.DATA.INPUT')
Action commands execute ISPF functions or TSO commands.
Commands can accept parameters.
Parameters in command definitions:
Parameters are passed to:
Custom commands can be used in various contexts.
Use commands from ISPF command line:
Use commands from panels:
Use commands in menus:
Examples of command table definitions.
Command that runs a REXX script:
1MYSCRIPT REXX('USERID.REXX(MYSCRIPT)')
Command that accepts parameters:
1MYEDIT REXX('USERID.REXX(EDITDSN)') 'DSN'
Command that displays a panel:
1MYMENU PANEL(MYMENU)
Command that performs an action:
1MYLIST LISTCAT ENTRIES('USERID.*')
Following best practices improves command table quality:
Think of command tables like a custom remote control:
So command tables are like programming a custom remote control for ISPF, where you create buttons (commands) that do exactly what you want them to do!
Complete these exercises to reinforce your command table skills:
Practice basics: create a simple command that executes a REXX script, understand command table structure, test the command, and learn basic command creation. Master basic command creation.
Practice parameters: create a command that accepts parameters, pass parameters to REXX script, test with different parameters, and learn parameter handling. Master command parameters.
Practice panel: create a command that displays a panel, understand panel commands, test panel display, and learn panel commands. Master panel commands.
Practice action: create a command that performs an action, understand action commands, test action execution, and learn action commands. Master action commands.
Practice complete: create a complete command table with multiple commands, organize commands, test all commands, and learn command table management. Master command table development.
1. Where are command tables stored?
2. What do command tables define?
3. What can custom commands execute?
4. How do you invoke custom commands?
5. What is ISPTLIB?