EXEC 2
{{about|the scripting language for the VM operating system|the operating system EXEC II|UNIVAC EXEC II|other uses|Exec (disambiguation)}}
EXEC 2 is an interpreted, command procedure control, computer scripting language used by the EXEC 2 Processor originally supplied with the CMS component of the IBM Virtual Machine/System Product (VM/SP) operating system.{{cite web|last=Varian|first=Melinda|title=VM AND THE VM COMMUNITY: Past, Present, and Future|url=http://web.me.com/melinda.varian/Site/Melinda_Varians_Home_Page_files/neuvm.pdf|accessdate=March 14, 2012}}
Relation to EXEC
EXEC 2 is mostly compatible{{cite manual
| title = IBM Virtual Machine/System Product: EXEC 2 Reference - Program Number 5664-167 - Release 2
| id = SC24-5219-1
| section = Appendix A: CMS EXEC and EXEC 2 Relationship
| section-url = http://bitsavers.org/pdf/ibm/370/VM/SP/Release_2_Jun82/SC24-5219-1_IBM_Virtual_Machine_System_Product_-_EXEC_2_Reference_Release_2_2nd_ed_198204.pdf#page=58
| pages = 48–55
| url = http://bitsavers.org/pdf/ibm/370/VM/SP/Release_2_Jun82/SC24-5219-1_IBM_Virtual_Machine_System_Product_-_EXEC_2_Reference_Release_2_2nd_ed_198204.pdf
| series = Program Product
| publisher = IBM
| access-date = April 29, 2022
}}
with CMS EXEC but EXEC 2 scripts must begin with an &TRACE statement. Some EXEC statements and predefined variables do not exist in EXEC 2, although in some cases there are analogs. There are some minor differences in some statements and predefined functions.
EXEC 2 has the following enhancements:{{cite web|last=IBM Corporation|title=EXEC 2 Processor and CMS EXEC Processor|url=http://publib.boulder.ibm.com/infocenter/zvm/v5r4/index.jsp?topic=/com.ibm.zvm.v54.dmsa3/exc2prc.htm|accessdate=March 14, 2012}}
- There is no 8-byte restriction on token length.{{cite web
|url=https://www.ibm.com/support/knowledgecenter/SSB27U_5.4.0/com.ibm.zvm.v54.dmsa3/exc2prc.htm
|title=EXEC 2 Processor and CMS EXEC Processor|website=IBM }}
- Statements can be up to 255 characters long.
- EXEC 2 can issue commands to subcommand environments as well as CMS and CP.
- EXEC 2 has additional built-in functions.
- EXEC 2 has user-defined functions.
- EXEC 2 commands may include subroutines and functions.
- EXEC 2 has extra debugging facilities.
- CMS programs can manipulate EXEC 2 variables.
Some statemts of EXEC are not supported in EXEC 2, including:
- &BEGSTACK ALL
- &CONTROL
- &EMSG
- &END
- &GOTO TOP
- &HEX
- &PUNCH
- &SPACE
- &TIME
Some predefined variables of EXEC are not defined in EXEC2:
- &*
- &$
- &DISKX
- &DISK*
- &DISK?
- &DOS
- &EXEC
- &GLOBAL
- &GLOBALn
- &READFLAG
- &TYPEFLAG
XEDIT Macros
XEDIT Macros are files with filetype XEDIT, whose contents are
written using the syntax of CMS EXEC, EXEC 2 or REXX.{{cite book
|title=EXEC 2 Reference
|pages=92
|url=http://bitsavers.trailing-edge.com/pdf/ibm/370/VM_SP/Release_2_Jun82/SC24-5219-1_VM_SP_EXEC_2_Rel_2_Reference_Apr82.pdf
|access-date=2017-12-03
|archive-date=2017-01-20
|archive-url=https://web.archive.org/web/20170120054533/http://bitsavers.trailing-edge.com/pdf/ibm/370/VM_SP/Release_2_Jun82/SC24-5219-1_VM_SP_EXEC_2_Rel_2_Reference_Apr82.pdf
|url-status=dead
}} Like regular EXEC 2 "EXEC" command
files, they begin with a "&TRACE" statement, to distinguish them from CMS EXEC files.
History
Written in the 1970s{{cite web
|title=EXEC 2 |url=https://encyclopedia2.thefreedictionary.com/EXEC+2}} and formally introduced for CMS with VM/SP Release 1, EXEC 2 was preceded by CMS EXEC and superseded by REXX.
All three command interpreters—CMS EXEC, EXEC 2 and REXX — continue to be supported by z/VM.
References
{{Reflist}}
External links
- [https://archive.today/20140417183004/http://publibfp.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/HCSD7B00/CCONTENTS#5.1 EXEC 2 Processor, CMS User's Guide, z/VM Version 5 Release 1.0, Program Number 5741-A05, Document Number SC24-6079-00, First Edition September 2004]
- [https://web.archive.org/web/20090221183151/http://www-01.ibm.com/software/awdtools/rexx/library/share56.html REX - A Command Programming Language, REX First Public Paper, SHARE 56, 18 Feb 1981]