CLIST
CLIST (Command List; pronounced "C-List") is a procedural programming language for Time Sharing Option (TSO) in SVS and MVS systems. It originated in OS/360[1] 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 is a list of commands to be executed in strict sequence (like a DOS batch file (*.bat) file). OS/VS2 R3.6 (MVS) added If-Then-Else logic and loop constructs to CLIST.[2] The term CLIST is also used for command lists written by users of NetView.[3]
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 languages 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[lower-roman 2][lower-roman 3]. CLISTs can display TSO I/O screens and menus by using ISPF dialog services.
Compare the function of CLIST with that provided by REXX.
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
Footnotes
- ↑ Usually IKJEFT01
- ↑ by running JCL that executes a TSO terminal monitor program[lower-roman 1] (TMP)
- ↑ This capability was added by the program product Time Sharing Option/Extensions (TSO/E), which is a standard part of OS/390 and z/OS.
References
- ↑ IBM System/360 Operating System: Time Sharing Option - Command Language Reference. Systems Reference Library (Fifth ed.). IBM. April 1973. pp. 245-249. GC28-6732-3. http://bitsavers.org/pdf/ibm/360/os/tso/GC28-6732-3_TSO_Command_Language_Ref_Jul72.pdf. Retrieved September 29, 2025.
- ↑ OS/VS2 TSO - Command Language Reference. Systems (Fourth ed.). IBM. January 1976. pp. 271-324. GC28-0646-3. http://bitsavers.org/pdf/ibm/370/OS_VS2/Release_3.7_1976/GC28-0646-3_OS_VS2_TSO_Command_Language_Reference_Rel_3.7_Jan76.pdf. Retrieved September 29, 2025.
- ↑ "z/OS TSO/E CLISTs". z/OS 2.1.0. IBM. 14 June 2013. https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.ikjb800/toc.htm. Retrieved 12 May 2016.
