CLIST

CLIST (Command List) (pronounced "C-List") 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. The term CLIST is also used for command lists written by users of NetView.[1]

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 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 (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 programs

PROC 0
WRITE HELLO WORLD!

Adding If-Then-Else logic:

 1    /********************************************************************/
 2    /*  MULTI-LINGUAL "HELLO WORLD" PROGRAM.                            */
 3    /*                                                                  */
 4    /*  THIS CLIST, STORED AS USERID.TSO.CLIST(TEST), CAN BE INVOKED    */
 5    /*  FROM THE ISPF COMMAND LINE AS SHOWN IN THE FOLLOWING EXAMPLE:   */
 6    /*                                                                  */
 7    /*     COMMAND ===> TSO TEST SPANISH                                */
 8    /*                                                                  */
 9    /********************************************************************/
10    PROC 1 LANGUAGE
11      IF &LANGUAGE = SPANISH THEN +
12         WRITE HOLA, MUNDO
13      ELSE IF &LANGUAGE = FRENCH THEN +
14         WRITE BONJOUR, MONDE
15      ELSE +
16         WRITE HELLO, WORLD
17    EXIT

[lower-roman 1]

gollark: https://dragcave.net/teleport/47497f47272e2fd80b72c8091a75b1de3G from a grave alt.
gollark: I can just hold it for you, loads of slots here.
gollark: ~~Talk of 3G SAltkins reminded me to breed my 2G. This is a chrono xenowyrm from alt arcana and black zyumorph. Please tell me if you take it or suffer an eternity of being complained at>https://dragcave.net/teleport/a335564e857e0ba589aa39fb49e44134~~
gollark: Yes, but *some people* need it to be explicitly told to them.
gollark: Look, if you don't want spooooky ghosts taking eggs, *just ask them to say if they take it!*

See also


Footnotes

  1. Here PROC is treated as a separate routine.

References

  1. "z/OS TSO/E CLISTs". z/OS 2.1.0. IBM. Retrieved 12 May 2016.


This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.