Commonly Used CLIST Commands

COMMONLY USED CLIST COMMAND

If you have heard a lot about CLIST but do not know where and how to start, here is a list of commonly used commands in CLIST.

I have a separate section which give you a simple step by step process to start using CLIST or REXX programming.

S.No Clist Command Its USE
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 &LASTCC The &LASTCC variable contains the return code from the last TSO command,subcommand, CLIST statement, or nested CLIST that was executed.
4 &LENGTH The &LENGTH function returns the number of bytes occupied by an expression or character string.
5 &MAXCC The &MAXCC variable contains the highest return code from any TSO command,subcommand, CLIST statement, or nested CLIST that was executed while the current CLIST is active.
6 &NRSTR The &NRSTR function defines a non-rescannable string.
7 &STR The &STR function is used to pass character data to a CLIST without any CLIST language evaluation being done on the data.
8 &SUBSTR The &SUBSTR function is used to extract a character string from within another character string.
9 &SYS_VARIABLES TSO/E contains certain control variables which are available for use in CLISTs that you write.
10 &SYS4DATE/ &SYS4JDATE/ &SYS4SDATE The three variables &SYS4DATE, &SYS4SDATE, and &SYS4JDATE provide the current date in a format that presents years as four-digit numbers. As opposed to the variables that present the current year as two-digit numbers, these variables are capable to handle years beyond 1999.
11 &SYSABNCD The &SYSABNCD variable provides the abend code received from a TSO command invoked via the TSOEXEC TSO command.
12 &SYSABNRC The &SYSABNRC variable provides the reason code for an abend of a TSO command invoked via the TSOEXEC TSO command.
13 &SYSAPPCLU &SYSAPPCLU contains the MVS/APPC logical unit (LU) name. The LU name identifies the TSO/E address space your CLIST will be running in as the SNA addressable unit for Advanced-Program-to-Program-communication (APPC).
14 &SYSASIS The &SYSASIS variable is used to turn the CONTROL ASIS option on or off.
15 &SYSCAPS &SYSCAPS is a function used to translate all characters in a given string to uppercase.
16 &SYSCLENGTH The &SYSCLENGTH function returns the number of bytes occupied by an expression or character string that includes DBCS characters.
17 &SYSCLONE &SYSCLONE returns the MVS system symbol representing its system name.
18 &SYSCMDRC The &SYSCMDRC variable provides the return code from a TSO command invoked via the TSOEXEC TSO command.
19 &SYSCONLIST The &SYSCONLIST variable is used to turn the CONTROL CONLIST option on or off.
20 &SYSCPU The &SYSCPU variable provides the amount of CPU time used during the current TSO session in the form seconds.hundreths’.
21 &SYSCSUBSTR The &SYSCSUBSTR is used to extract DBCS characters from a string and treat each DBCS pair as single characters for purposes of extraction.
22 &SYSDATE The &SYSDATE variable supplies the current date in the American standard form, ‘month/day/year’.
23 &SYSDFP &SYSDFP contains the level of MVS/Data Facility Product (MVS/DFP) installed.
24 &SYSDLM The &SYSDLM variable returns a number that is the relative position of the TERMIN statement character string entered by the TSO user to return control to a CLIST.
25 &SYSDSN You can use the &SYSDSN function to find out whether a particular data set or PDS member exists.
26 &SYSDVAL The ‘DVAL’ in the variable stands for ‘Default VALue’. This variable can be used for:
1) extracting the TSO user’s response after a READ statement with no operands
2) extracting the TSO user’s response when a CLIST returns control after a TERMIN statement executes
3) extracting the TSO user’s response when a READDVAL statement is executed.
27 &SYSENV The &SYSENV variable is used to determine whether a CLIST is executing under foreground or background (batch) TSO.
28 &SYSFLUSH The &SYSFLUSH variable is used to turn the CONTROL FLUSH option on or off.
29 &SYSHSM The &SYSHSM variable is used to determine the status of HSM (the Hiearchical Storage Manager).
30 &SYSICMD The &SYSICMD variable contains the name by which the currently executing CLIST was invoked.
31 &SYSINDEX The &SYSINDEX function is used to find the position of one character string within another.
32 &SYSISPF The &SYSISPF variable is used to determine whether or not the current CLIST is executing under ISPF.
33 &SYSJDATE The &SYSJDATE variable supplies the current date in Julian date format.
34 &SYSJES &SYSJES contains the name and the level of the JES installed.
35 &SYSLC &SYSLC is a function used to translate all characters in a given string to lowercase.
36 &SYSLIST The &SYSLIST variable is used to turn the CONTROL LIST option on or off.
37 &SYSLRACF The &SYSLRACF variable is used to determine the level of RACF (the Resource Access Control Facility) that is installed.
38 &SYSLTERM The &SYSLTERM variable supplies the number of lines (rows) available on the TSO terminal screen.
39 &SYSMSG The &SYSMSG variable is used to turn the CONTROL MSG option on or off.
40 &SYSMVS &SYSMVS contains the level of the base control program (BCP) component of OS/390*.
41 &SYSNAME &SYSNAME returns the system’s name your CLIST is running on.
42 &SYSNEST The &SYSNEST variable is used to determine whether or not the currently executing CLIST is a nested CLIST.
43 &SYSNODE &SYSNODE contains the network node name of your installation’s JES.
44 &SYSNSUB You can use the &SYSNSUB function to limit how many times symbolic variable substitution is performed on part of a CLIST language statement.
45 &SYSONEBYTE You can use the &SYSONEBYTE function to convert a character string from the double-byte (DBCS) character format to the normal EBCDIC character format.
46 &SYSOPSYS &SYSOPSYS contains the OS/390 name, version, release, modification level.
47 &SYSOUTLINE The &SYSOUTLINE variable and the &SYSOUTTRAP variable are used to trap the output from TSO commands that do not use the TPUT macro to write messages to the TSO terminal.
48 &SYSOUTTRAP The &SYSOUTTRAP variable and the &SYSOUTLINE variable are used to trap the output from TSO commands that do not use the TPUT macro to write messages to the TSO terminal.
49 &SYSPCMD The &SYSPCMD variable contains the name of the most recently executed TSO command.
50 &SYSPLEX &SYSPLEX returns the MVS sysplex name as found in the COUPLExx or LOADxx member of SYS1.PARMLIB.
51 &SYSPREF The &SYSPREF variable provides the currently active data set name prefix for the TSO user.
52 &SYSPROC &SYSPROC provides the name of the logon procedure used when the user logged on to the current TSO/E session.
53 &SYSPROMPT The &SYSPROMPT variable is used to turn the CONTROL PROMPT option on or off.
54 &SYSRACF The &SYSRACF variable is used to determine whether or not RACF (the Resource Access Control Facility) is installed.
55 &SYSSCAN The &SYSSCAN variable is used to set the maximum number of times symbolic substitution is to be performed on each statement in a CLIST.The defaulThe &SYSSCAN variable is used to set the maximum number of times symbolic substitution is to be performed on each statement in a CLIST.
56 &SYSSCMD The &SYSSCMD variable contains the name of the most recently executed TSO command.
57 &SYSSDATE The &SYSSDATE variable supplies the current date in a format well suited to sorting by date, as ‘year/month/day’.
58 &SYSSECLAB &SYSSECLAB returns the SECLABEL name that is valid for the TSO/E session where the CLIST is started.
59 &SYSSMFID &SYSSMFID identifies the system on which System Management Facilities (SMF) is active.
60 &SYSSMS &SYSSMS indicates whether DFSMS/MVS is available to your CLIST.
61 &SYSSRV The &SYSSRV variable provides the number of service units used during the current TSO session.  Service units consist of CPU time, I/Os, and main storage occupancy values and are used within MVS to manage work flow.
62 &SYSSTIME The &SYSSTIME variable supplies the current time of day in the form hours:minutes.A 24-hour clock format is used for the time display.
63 &SYSSYMDEF &SYSSYMDEF(symbol_name) returns the value represented by the variable “symbol_name” as specified in SYS1.PARMLIB member IEASYMxx on the SYSDEF … SYMDEF statement. Or, the ‘string’ can also be one of the system static or dynamic symbols as defined in OS/390 MVS Initialization and Tuning Reference.
64 &SYSSYMLIST The &SYSSYMLIST variable is used to turn the CONTROL SYMLIST option on or off.
65 &SYSTERMID &SYSTERMID contains the terminal ID of the terminal where the CLIST has been started.
66 &SYSTIME The &SYSTIME variable supplies the current time of day in the form hours:minutes:seconds.  A 24-hour clock format is used for the time display
67 &SYSTSOE The &SYSTSOE variable is used to determine the release level of TSO/E.
68 &SYSTWOBYTE You can use the &SYSTWOBYTE function to convert a character string from the normal EBCDIC format to the double-byte (DBCS) character format.
69 &SYSUID The &SYSUID variable provides the TSO user ID for the current TSO session.
70 &SYSWTERM The &SYSWTERM variable supplies the number of columns available on the TSO terminal screen.
71 ATTN The ATTN statement is used to identify a routine in a CLIST that is to receive control if the ATTN or PA1 key is pressed while the CLIST is active.
72 CLOSFILE The CLOSFILE statement is used to close a QSAM file that was opened previously by an OPENFILE statement.
73 CONTROL The CONTROL statement defines processing options for a CLIST.
74 DATA The DATA-ENDDATA statement pair is used to delimit or bracket CLIST statements that are not to be interpreted as CLIST statements, but are to be passed directly to TSO for execution.
75 DATAPROM The DATA PROMPT-ENDDATA statement pair is used to specify prompts to TSO commands or subcommands.
76 DO The DO statement is used to identify the start of a set of CLIST statements or TSO command or subcommands to be executed iteratively.
77 END(DO) The END statement is used to mark the end of a DO-END statement pair.
78 ERROR The ERROR statement is used to identify a routine or statement to receive control when any non-zero return code is received from a CLIST statement, TSO command, or TSO subcommand in the current CLIST.
79 EXIT The EXIT statement returns control to the program that invoked the current CLIST.
80 FUNCTION TSO/E contains several built-in functions that you can use to manipulate variables or expressions.
81 GETFILE The GETFILE statement is used to read one record from a QSAM file (sequential file or a PDS member) into a CLIST file-name variable.
82 GLOBAL The GLOBAL statement allows you to share variables among nested CLISTs.
83 GOTO The GOTO statement causes a direct branch in CLIST execution flow to the label named on the GOTO statement.
84 IF The IF-THEN-ELSE statement sequence is used to alter the flow of execution within a CLIST.
85 LISTDSI The LISTDSI statement will retrieve information about an existing data set and store the information in special CLIST variables.
86 NGLOBAL The NGLOBAL statement allows you to share variables between “subprocedures” in CLISTs.
87 OPENFILE The OPENFILE statement is used to open a QSAM file (sequential file or a PDS member) for I/O from a CLIST.
88 PROC The PROC statement defines the parameters to be passed to a CLIST when it is invoked, or (for TSO/E R4 and above only) defines the beginning of a subprocedure within a CLIST.
89 PUTFILE The PUTFILE statement is used to write a record to a sequential file or PDS member using the QSAM access method.
90 READ The READ statement is used to read input from the TSO terminal and store it in symbolic variables.
91 READDVAL The READDVAL statement is used to copy the current contents of the control variabel &SYSDVAL to one or more symbolic variables.
92 RETURN The RETURN statement is used to return control from a CLIST error or attention exit to the statement after the one that caused the error or during which the ATTN key was pressed.
93 SELECT The SELECT statement is used to perform one of several processing steps depending on the value of one or more logical expressions.
94 SET The SET statement is used to assign a value to a symbolic variable within a CLIST.
95 SYSCALL The SYSCALL statement is used to pass control to a subprocedure within a CLIST.
96 SYSREF The SYSREF statement is used to name variables passed to a subprocedure that can be modified by the subprocedure.
97 TERMIN The TERMIN statement is used to pass control to the TSO user who invoked the CLIST.
98 VARIABLE Symbolic variables are used in CLISTs to contain values that the CLIST assigns to them.
99 WRITE The WRITE statement is used to send messages to the TSO terminal user that invoked the CLIST.
100 WRITENR The WRITENR statement is used to send messages to the TSO terminal user that invoked the CLIST.