The CMD tag defines a command within an
application command table.
Syntax
>>-<CMD--NAME=internal-command-name----------------------------->
>--+------------------------------+-->-------------------------->
'-ALTDESCR=command-description-'
>--+-----------------------+--+--------+-----------------------><
'-external-command-name-' '-</CMD>-'
Parameters
- NAME=internal-command-name
- This
attribute specifies an internal name for the command. The internal-command-name must
have these characteristics:
- 2-8 single-byte characters in length
- The first (or only) character must be A-Z, a-z, @, #, or $.
- Remaining characters, if any, can be A-Z, a-z, @, #, $, —, or
0-9.
Lowercase characters are translated
to their uppercase equivalents.
The
internal-command-name is
used in two ways:
- As the command table search criteria when:
- A key defined in the current key list is pressed
- A pull-down choice with an associated RUN action is selected
- A command is entered in the command area of a panel.
- As the value passed to dialogs when the command action is PASSTHRU
or SETVERB. See CMDACT (Command Action) for more
information about the PASSTHRU and SETVERB command actions.
- ALTDESCR=command-description
- This attribute
provides a description of the command. It is placed in the ISPF variable
ZCTDESC. The command-description text length is limited to
80 bytes.
- external-command-name
- Specifies the external name for this command.
Note: The
external-command-name must
be equal to the
internal-command-name. You must use the
external-command-name to
support the ability provided by ISPF for truncated command entry and
the T (truncation) tag. For more information, see
T (Truncation).
Comments
The
CMD tag defines a command within an application command table. The
defined command can be issued by an application user by entering
the internal-command-name in the panel command area, or pressing
a function key, or selecting a pull-down choice that references the
command's internal-command-name. See KEYI (Key Item) and ACTION (Action) for additional information.
The
action to be taken when a command is issued is defined with the CMDACT
tag. See CMDACT (Command Action) for information
about defining command actions.
Restrictions
- The CMD tag must be coded within a CMDTBL definition. See CMDTBL (Command Table) for a complete description of
this tag.
Examples
Here is source
file markup that contains a command table that defines the commands
UPDATE, ADD, DELETE, and SEARCH. The DELETE and UPDATE commands have
defined truncations.
<!DOCTYPE DM SYSTEM>
<CMDTBL APPLID=conv>
<CMD NAME=update>Upd<T>ate
<CMDACT ACTION='alias add'>
<CMD NAME=add>Add
<CMDACT ACTION=setverb>
<CMD NAME=delete>Del<T>ete
<CMDACT ACTION=passthru>
<CMD NAME=search>Search
<CMDACT ACTION=passthru>
</CMDTBL>
This table shows the resultant ISPF application command
table.
Table 2. ISPF
application command tableZCTVERB |
ZCTTRUNC |
ZCTACT |
---|
UPDATE |
3 |
ALIAS ADD |
ADD |
0 |
SETVERB |
DELETE |
3 |
PASSTHRU |
SEARCH |
0 |
PASSTHRU |