CLIST (Command List) (pronounced "C-List") is a
procedural programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
for
TSO in
MVS systems. It originated in
OS/360 Release 20 and has assumed a secondary role since the availability of
Rexx
Rexx (restructured extended executor) is a high-level programming language developed at IBM by Mike Cowlishaw. Both proprietary and open-source software, open source Rexx interpreter (computing), interpreters exist for a wide range of comput ...
in TSO/E Version 2. The term CLIST is also used for command lists written by users of
NetView.
In its basic form, a CLIST program (or "CLIST" for short) can take the form of a simple list of
commands to be executed in strict sequence (like a
DOS batch file
A batch file is a Scripting language, script file in DOS, OS/2 and Microsoft Windows. It consists of a series of Command (computing), commands to be executed by the command-line interpreter, stored in a plain text file. A batch file may contain a ...
(*.bat) file). However, CLIST also features If-Then-Else logic as well as loop constructs.
CLIST is an
interpreted language
In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program. An inter ...
. That is, the computer must translate a CLIST every time the program is executed. CLISTs therefore tend to be slower than programs written in
compiled language
Compiled language categorizes a programming language as used with a compiler and generally implies not used with an interpreter. But, since any language can theoretically be compiled or interpreted the term lacks clarity. In practice, for some lan ...
s such as
COBOL
COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural, and, since 2002, object-oriented language. COBOL is primarily ...
,
FORTRAN, or
PL/1. (A program written in a compiled language is translated once to create a "load module" or
executable
In computer science, executable code, an executable file, or an executable program, sometimes simply referred to as an executable or binary, causes a computer "to perform indicated tasks according to encoded instruction (computer science), in ...
.)
CLIST can read/write MVS files and read/write from/to a TSO terminal. It can read parameters from the caller and also features a function to hold global variables and pass them between CLISTs. A CLIST can also call an MVS application program (written in
COBOL
COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural, and, since 2002, object-oriented language. COBOL is primarily ...
or
PL/I
PL/I (Programming Language One, pronounced and sometimes written PL/1) is a procedural, imperative computer programming language initially developed by IBM. It is designed for scientific, engineering, business and system programming. It has b ...
, for example). CLISTs can be run in background. CLISTs can display TSO I/O screens and menus by using
ISPF
In computing, Interactive System Productivity Facility (ISPF) is a software product for many historic IBM mainframe operating systems and currently the z/OS and z/VM operating systems that run on IBM mainframes. It includes a Text editor, screen e ...
dialog services.
Compare the function of CLIST with that provided by
REXX
Rexx (restructured extended executor) is a high-level programming language developed at IBM by Mike Cowlishaw. Both proprietary and open-source software, open source Rexx interpreter (computing), interpreters exist for a wide range of comput ...
.
Example programs
PROC 0
WRITE HELLO WORLD!
Adding If-Then-Else logic:
/********************************************************************/
/* MULTI-LINGUAL "HELLO WORLD" PROGRAM. */
/* */
/* THIS CLIST, STORED AS USERID.TSO.CLIST(TEST), CAN BE INVOKED */
/* FROM THE ISPF COMMAND LINE AS SHOWN IN THE FOLLOWING EXAMPLE: */
/* */
/* COMMAND > TSO TEST SPANISH */
/* */
/********************************************************************/
PROC 1 LANGUAGE
IF &LANGUAGE = SPANISH THEN +
WRITE HOLA, MUNDO
ELSE IF &LANGUAGE = FRENCH THEN +
WRITE BONJOUR, MONDE
ELSE +
WRITE HELLO, WORLD
EXIT
See also
*
Rexx
Rexx (restructured extended executor) is a high-level programming language developed at IBM by Mike Cowlishaw. Both proprietary and open-source software, open source Rexx interpreter (computing), interpreters exist for a wide range of comput ...
Footnotes
References
IBM mainframe operating systems
Procedural programming languages
Command shells
Text-oriented programming languages
Scripting languages
{{mainframe-compu-stub