CLIST
Encyclopedia
CLIST is a procedural
programming language
for TSO
in MVS
systems. It originated in OS/360 Release 20 and has assumed a secondary role since the availability of Rexx
in TSO/E Version 2.
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
(*.bat) file). However, CLIST also features If-Then-Else logic as well as loop constructs.
CLIST is an interpreted language
. 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
s such as COBOL
, FORTRAN
, or PL/1
. (A program written in a compiled language is translated once to create a "load module" or executable
.)
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
or PL/I
, for example). CLISTs can be run in background (by running JCL
which executes the TSO control program (IKJEFT01)). TSO I/O screens and menus using ISPF
dialog services can be displayed by CLISTs.
Compare the function of CLIST with that provided by REXX
.
Example program:
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
Procedural programming
Procedural programming can sometimes be used as a synonym for imperative programming , but can also refer to a programming paradigm, derived from structured programming, based upon the concept of the procedure call...
programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....
for TSO
Time Sharing Option
In computing, Time Sharing Option is an interactive time-sharing environment for IBM mainframe operating systems, including OS/360 MVT, OS/VS2 , MVS, OS/390, and z/OS.- Overview :TSO fulfills a similar purpose to Unix login sessions...
in MVS
MVS
Multiple Virtual Storage, more commonly called MVS, was the most commonly used operating system on the System/370 and System/390 IBM mainframe computers...
systems. It originated in OS/360 Release 20 and has assumed a secondary role since the availability of Rexx
REXX
REXX is an interpreted programming language that was developed at IBM. It is a structured high-level programming language that was designed to be both easy to learn and easy to read...
in TSO/E Version 2.
In its basic form, a CLIST program (or "CLIST" for short) can take the form of a simple list of commands
Command (computing)
In computing, a command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell....
to be executed in strict sequence (like a DOS
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...
batch file
Batch file
In DOS, OS/2, and Microsoft Windows, batch file is the name given to a type of script file, a text file containing a series of commands to be executed by the command interpreter....
(*.bat) file). However, CLIST also features If-Then-Else logic as well as loop constructs.
CLIST is an interpreted language
Interpreted language
Interpreted language is a programming language in which programs are 'indirectly' executed by an interpreter program. This can be contrasted with a compiled language which is converted into machine code and then 'directly' executed by the host CPU...
. 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
A compiled language is a programming language whose implementations are typically compilers , and not interpreters ....
s such as COBOL
COBOL
COBOL is one of the oldest programming languages. Its name is an acronym for COmmon Business-Oriented Language, defining its primary domain in business, finance, and administrative systems for companies and governments....
, FORTRAN
Fortran
Fortran is a general-purpose, procedural, imperative programming language that is especially suited to numeric computation and scientific computing...
, or PL/1
PL/I
PL/I is a procedural, imperative computer programming language designed for scientific, engineering, business and systems programming applications...
. (A program written in a compiled language is translated once to create a "load module" or executable
Executable
In computing, an executable file causes a computer "to perform indicated tasks according to encoded instructions," as opposed to a data file that must be parsed by a program to be meaningful. These instructions are traditionally machine code instructions for a physical CPU...
.)
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
COBOL is one of the oldest programming languages. Its name is an acronym for COmmon Business-Oriented Language, defining its primary domain in business, finance, and administrative systems for companies and governments....
or PL/I
PL/I
PL/I is a procedural, imperative computer programming language designed for scientific, engineering, business and systems programming applications...
, for example). CLISTs can be run in background (by running JCL
Job Control Language
Job Control Language is a scripting language used on IBM mainframe operating systems to instruct the system on how to run a batch job or start a subsystem....
which executes the TSO control program (IKJEFT01)). TSO I/O screens and menus using ISPF
ISPF
In computing, Interactive System Productivity Facility is a software product for the z/OS operating system that runs on IBM mainframes...
dialog services can be displayed by CLISTs.
Compare the function of CLIST with that provided by REXX
REXX
REXX is an interpreted programming language that was developed at IBM. It is a structured high-level programming language that was designed to be both easy to learn and easy to read...
.
Example program:
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