Programming Help by Programmers hub

CList programming Language

Clist is an interpreted language which is used to execute a series of TSO commands and sub-commands to save time and effort. Clists are program that reside in either sequential and partitioned data set. The sequential Clist contains the commands in the proper listing and execute in the sequence but in the partitioned data set it may contain one or more Clist's. Clist have the many features like other programming languages Error handling, perform I/O, define and use symbolic variables, communicate with uses at terminal.

Two types of Clist's

  1. Simple Clist : A simple Clist is a basic Clist which contain the sequence of TSO commands and sub-commands.
  2. Programmable Clist : A programable Clist cotains Clist statements in addition to the TSO commands and subcommands

CList program example

PROC 1 LANGUAGE
    IF &LANGUAGE = SPANISH THEN +
       WRITE HOLA, MUNDO
    ELSE IF &LANGUAGE = FRENCH THEN +
       WRITE BONJOUR, MONDE
    ELSE +
       WRITE HELLO, WORLD
  EXIT

Some Common Clist Commands

S.NO Clist command Description
1 &DATATYPE &DATATYPE is used to determine the data type of an expression
2 &EVAL &EVAL forces numeric evaluation of the expression that is passed to the function
3 &NRSTR The &NRSTR function defines a non-rescannable stringn
4 &SYSABNCD The &SYSABNCD variable provides the abend code received from a TSO command invoked via the TSOEXEC TSO command
5 &SYSLTERM The &SYSLTERM variable supplies the number of lines (rows) available on the TSO terminal screen
6 &SYSTSOE The &SYSTSOE variable is used to determine the release level of TSO/