This articlerelies largely or entirely on asingle source. Relevant discussion may be found on thetalk page. Please helpimprove this article byintroducing citations to additional sources. Find sources: "CLIST" – news ·newspapers ·books ·scholar ·JSTOR(April 2024) |
CLIST (Command List; pronounced "C-List") is aproceduralprogramming language forTime Sharing Option (TSO) inSVS andMVS systems. It originated inOS/360[1] Release 20 and has assumed a secondary role since the availability ofRexx in TSO/E Version 2. In its basic form, a CLIST program is a list ofcommands to be executed in strict sequence (like aDOSbatch 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 ofNetView.[3]
CLIST is aninterpreted language. That is, the computer must translate a CLIST every time the program is executed. CLISTs therefore tend to be slower than programs written incompiled languages such asCOBOL,FORTRAN, orPL/1. (A program written in a compiled language is translated once to create a "load module" orexecutable.)
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 inCOBOL orPL/I, for example). CLISTs can be run in background[ii][iii]. CLISTs can display TSO I/O screens and menus by usingISPF dialog services.
Compare the function of CLIST with that provided byREXX.
PROC0WRITEHELLOWORLD!
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 *//* *//********************************************************************/PROC1LANGUAGEIF&LANGUAGE=SPANISHTHEN+WRITEHOLA,MUNDOELSEIF&LANGUAGE=FRENCHTHEN+WRITEBONJOUR,MONDEELSE+WRITEHELLO,WORLDEXIT