---
title: "Mainframe CLIST pdf and examples"
description: "CLIST is an interpreted language. CLISTs can be run in background (by running JCL which executes the TSO control program (IKJEFT01)). Read more with examples."
url: https://srinimf.com/2017/06/19/clist-examples/
date: 2017-06-19
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2017/06/pexels-photo-5011647.jpeg?fit=1880%2C1058&ssl=1
categories: ["CLIST"]
tags: ["CLIST examples", "CLIST in mainframe pdf"]
type: post
lang: en
---

# Mainframe CLIST pdf and examples

The CLIST language enables you to work more efficiently with TSO/E. You can write programs, called CLISTs, that perform given tasks or groups of tasks. From then on, you can simply invoke the CLISTs to do those tasks. 

Advertisements

## **What is CLIST**

The term CLIST (pronounced “sea list”) is short for Command LIST, because the most basic CLISTs are lists of TSO/E commands. When you invoke such a CLIST, it issues the TSO/E commands in sequence.[Download CLIST pdf at free of cost.](http://math.uni.lodz.pl/~arogow/os390/podr/TSO%20CLIST.pdf)

Related[How to Run TSO Commands Correctly](https://srinimf.com/2020/12/20/mainframe-tso-session-the-real-purpose/)

Besides issuing TSO/E commands, CLISTs can perform more complex programming tasks. The CLIST language includes the programming tools you need to write extensive, structured applications.

## **Purpose of CLIST**

CLISTs can perform any number of complex tasks, from displaying a series of full-screen panels to managing programs written in other languages.

The CLIST language is an interpretive language. Like programs in other high-level interpretive languages, CLISTs are easy to write and test. You don’t have to compile and link-edit them.

To test a CLIST, you execute it, correct any errors, and re-execute it. The CLIST language is one of two command languages available in TSO/E.

## **According to [Wiki the CLIST](https://en.wikipedia.org/wiki/CLIST) is as follows:**

*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.[The best available book on CLIST find here.](http://amzn.to/2rrojdu)

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.

---

## **Best CLIST example**

```
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
```

Related Posts

- [How to Execute TSO, CLIST and REXX Commands](https://srinimf.com/2014/08/04/mainframe-tso-clist-and-rexx/)DateAugust 4, 2014
- [How to Run TSO Commands Correctly](https://srinimf.com/2020/12/20/mainframe-tso-session-the-real-purpose/)DateDecember 20, 2020
- [What is Data Stack in TSO Rexx](https://srinimf.com/2016/03/02/what-is-data-stack-in-tso-rexx/)DateMarch 2, 2016

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2017%2F06%2F19%2Fclist-examples%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2017%2F06%2Fpexels-photo-5011647.jpeg%3Ffit%3D1200%252C675%26ssl%3D1&description=Mainframe%20CLIST%20pdf%20and%20examples)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2017/06/19/clist-examples/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2017/06/19/clist-examples/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2017/06/19/clist-examples/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2017/06/19/clist-examples/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Mainframe%20CLIST%20pdf%20and%20examples&body=https%3A%2F%2Fsrinimf.com%2F2017%2F06%2F19%2Fclist-examples%2F&share=email)
-

### Like this:

Like Loading…
