EXEC 2
| Company type | Scripting language |
|---|---|
| Industry | Computer software |
| Predecessor | CMS EXEC |
| Founded | 1970s |
| Successor | REXX |
| Products | EXEC 2 scripting language |
EXEC 2 is a scripting language designed for interpreted command procedure control, utilized by the EXEC 2 Processor. It was initially provided as part of the CMS within the IBM Virtual Machine/System Product (VM/SP) operating system.
Relation to EXEC
While largely compatible with CMS EXEC, EXEC 2 scripts are required to start with an &TRACE directive. Certain EXEC commands and predefined variables are missing in EXEC 2, although alternatives are available in some instances. Additionally, there are slight variations in some commands and predefined functions.
Key improvements introduced by EXEC 2 include:
- Removal of the 8-byte token length limitation.
- Support for statements up to 255 characters in length.
- Capability to send commands to subcommand environments, including CMS and CP.
- Expanded set of built-in and user-defined functions.
- Inclusion of subroutines and functions within command processing.
- Advanced debugging features.
- Interaction with EXEC 2 variables by CMS programs.
The following EXEC commands are not supported in EXEC 2:
- &BEGSTACK ALL
- &CONTROL
- &EMSG
- &END
- &GOTO TOP
- &HEX
- &PUNCH
- &SPACE
- &TIME
Predefined EXEC variables absent from EXEC 2 consist of:
- &*
- &$
- &DISKX
- &DISK*
- &DISK?
- &DOS
- &EXEC
- &GLOBAL
- &GLOBALn
- &READFLAG
- &TYPEFLAG
XEDIT Macros
XEDIT Macros are XEDIT filetype scripts written in CMS EXEC, EXEC 2, or REXX syntax. Similar to standard EXEC 2 "EXEC" command files, they commence with an "&TRACE" statement to differentiate them from CMS EXEC scripts.
History
EXEC 2 was developed during the 1970s and introduced alongside VM/SP Release 1 for CMS. It succeeded CMS EXEC and was eventually superseded by REXX. Despite this, all three interpreters—CMS EXEC, EXEC 2, and REXX—continue to be supported by z/VM.