Basic 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.NoClist CommandIts 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&LASTCCThe &LASTCC variable contains the return code from the last TSO command,subcommand, CLIST statement, or nested CLIST that was executed.
4&LENGTHThe &LENGTH function returns the number of bytes occupied by an expression or character string.
5&MAXCCThe &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&NRSTRThe &NRSTR function defines a non-rescannable string.
7&STRThe &STR function is used to pass character data to a CLIST without any CLIST language evaluation being done on the data.
8&SUBSTRThe &SUBSTR function is used to extract a character string from within another character string. 
9&SYS_VARIABLESTSO/E contains certain control variables which are available for use in CLISTs that you write.
10&SYS4DATE/ &SYS4JDATE/ &SYS4SDATEThe 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&SYSABNCDThe &SYSABNCD variable provides the abend code received from a TSO command invoked via the TSOEXEC TSO command.
12&SYSABNRCThe &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&SYSASISThe &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&SYSCLENGTHThe &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&SYSCMDRCThe &SYSCMDRC variable provides the return code from a TSO command invoked via the TSOEXEC TSO command.
19&SYSCONLISTThe &SYSCONLIST variable is used to turn the CONTROL CONLIST option on or off.
20&SYSCPUThe &SYSCPU variable provides the amount of CPU time used during the current TSO session in the form seconds.hundreths'.
21&SYSCSUBSTRThe &SYSCSUBSTR is used to extract DBCS characters from a string and treat each DBCS pair as single characters for purposes of extraction.
22&SYSDATEThe &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&SYSDLMThe &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&SYSDSNYou can use the &SYSDSN function to find out whether a particular data set or PDS member exists.
26&SYSDVALThe '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&SYSENVThe &SYSENV variable is used to determine whether a CLIST is executing under foreground or background (batch) TSO.
28&SYSFLUSHThe &SYSFLUSH variable is used to turn the CONTROL FLUSH option on or off.
29&SYSHSMThe &SYSHSM variable is used to determine the status of HSM (the Hiearchical Storage Manager).
30&SYSICMDThe &SYSICMD variable contains the name by which the currently executing CLIST was invoked.
31&SYSINDEXThe &SYSINDEX function is used to find the position of one character string within another.
32&SYSISPFThe &SYSISPF variable is used to determine whether or not the current CLIST is executing under ISPF.
33&SYSJDATEThe &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&SYSLISTThe &SYSLIST variable is used to turn the CONTROL LIST option on or off.
37&SYSLRACFThe &SYSLRACF variable is used to determine the level of RACF (the Resource Access Control Facility) that is installed.
38&SYSLTERMThe &SYSLTERM variable supplies the number of lines (rows) available on the TSO terminal screen.
39&SYSMSGThe &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&SYSNESTThe &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&SYSNSUBYou can use the &SYSNSUB function to limit how many times symbolic variable substitution is performed on part of a CLIST language statement.
45&SYSONEBYTEYou 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&SYSOUTLINEThe &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&SYSOUTTRAPThe &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&SYSPCMDThe &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&SYSPREFThe &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&SYSPROMPTThe &SYSPROMPT variable is used to turn the CONTROL PROMPT option on or off.
54&SYSRACFThe &SYSRACF variable is used to determine whether or not RACF (the Resource Access Control Facility) is installed.
55&SYSSCANThe &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&SYSSCMDThe &SYSSCMD variable contains the name of the most recently executed TSO command.
57&SYSSDATEThe &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&SYSSRVThe &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&SYSSTIMEThe &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&SYSSYMLISTThe &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&SYSTIMEThe &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&SYSTSOEThe &SYSTSOE variable is used to determine the release level of TSO/E.
68&SYSTWOBYTEYou can use the &SYSTWOBYTE function to convert a character string from the normal EBCDIC format to the double-byte (DBCS) character format.
69&SYSUIDThe &SYSUID variable provides the TSO user ID for the current TSO session.
70&SYSWTERMThe &SYSWTERM variable supplies the number of columns available on the TSO terminal screen.
71ATTNThe 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.
72CLOSFILEThe CLOSFILE statement is used to close a QSAM file that was opened previously by an OPENFILE statement.
73CONTROLThe CONTROL statement defines processing options for a CLIST.
74DATAThe 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.
75DATAPROMThe DATA PROMPT-ENDDATA statement pair is used to specify prompts to TSO commands or subcommands.
76DOThe DO statement is used to identify the start of a set of CLIST statements or TSO command or subcommands to be executed iteratively.
77END(DO)The END statement is used to mark the end of a DO-END statement pair.
78ERRORThe 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.
79EXITThe EXIT statement returns control to the program that invoked the current CLIST.
80FUNCTIONTSO/E contains several built-in functions that you can use to manipulate variables or expressions.
81GETFILEThe GETFILE statement is used to read one record from a QSAM file (sequential file or a PDS member) into a CLIST file-name variable.
82GLOBALThe GLOBAL statement allows you to share variables among nested CLISTs.
83GOTOThe GOTO statement causes a direct branch in CLIST execution flow to the label named on the GOTO statement.
84IFThe IF-THEN-ELSE statement sequence is used to alter the flow of execution within a CLIST.
85LISTDSIThe LISTDSI statement will retrieve information about an existing data set and store the information in special CLIST variables.
86NGLOBALThe NGLOBAL statement allows you to share variables between "subprocedures" in CLISTs.
87OPENFILEThe OPENFILE statement is used to open a QSAM file (sequential file or a PDS member) for I/O from a CLIST.
88PROCThe 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.
89PUTFILEThe PUTFILE statement is used to write a record to a sequential file or PDS member using the QSAM access method.
90READThe READ statement is used to read input from the TSO terminal and store it in symbolic variables.
91READDVALThe READDVAL statement is used to copy the current contents of the control variabel &SYSDVAL to one or more symbolic variables.
92RETURNThe 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.
93SELECTThe SELECT statement is used to perform one of several processing steps depending on the value of one or more logical expressions.
94SETThe SET statement is used to assign a value to a symbolic variable within a CLIST.
95SYSCALLThe SYSCALL statement is used to pass control to a subprocedure within a CLIST.
96SYSREFThe SYSREF statement is used to name variables passed to a subprocedure that can be modified by the subprocedure.
97TERMINThe TERMIN statement is used to pass control to the TSO user who invoked the CLIST.
98VARIABLESymbolic variables are used in CLISTs to contain values that the CLIST assigns to them.
99WRITEThe WRITE statement is used to send messages to the TSO terminal user that invoked the CLIST.
100WRITENRThe WRITENR statement is used to send messages to the TSO terminal user that invoked the CLIST.

 

 

Comments

Really good work.. Helps a lot.. thanks for posting this..

Great work..!!!

Definitely it will help to everyone who read it.

Cheers...

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer

Navigation