Site icon AS400 ISeries

AS400 Control Language

IBM System/370 Model 145
IBM System/370 Model 145 (Photo credit: jovike)

The AS/400 Control Language (CL) is a scripting language for the IBM AS/400 mid range platform bearing a resemblance to the IBM Job Control Language and consisting of an ever-expanding set of command objects (*CMD) used to invoke traditional AS/400 programs and/or get help on what those programs do. CL can also be used to create CL programs (congruent to shell scripts) where there are additional commands that provide program-like functionality (GOTO, IF/ELSE, variable declaration, file input, etc.)

Advertisements

The vast majority of AS/400 commands were written by IBM developers to perform system level tasks like compiling programs, backing up data, changing system configurations, displaying system object details, or deleting them. Commands are not limited to systems level concerns and can be drafted for user applications as well.

Control Language (CL), an integral part of OS/400, is a set of commands by which users control operations and request system-related functions on the AS/400. A CL command usually is made up of three-character words; up to 10 characters (usually three words) can be merged together to form commands. For example, in CL, work is abbreviated as WRK, system is abbreviated as SYS, and status is abbreviated as STS. The command WRKSYSSTS, therefore, is translated as Work with the System Status. CL commands can be entered on the command line or executed from within a program. When commands are entered via a program or menu, the user selects options that are displayed in more friendly, English-type format. The program then translates the selected option into the appropriate CL command or commands.

Advertisements

The conventions for naming the combination verb and object commands are as follows:

The primary convention (as just shown) is to use three letters from each word in the descriptive command name to form the abbreviated command name that is recognized by the system.

The secondary convention is to use single letters from the ending word or words in the command title for the end of the command name, such as the three single letters DLO on the DLTDLO (Delete Document Library Object) command.

An occasional convention is to use single letters in the middle of the command name (usually between commonly used three-character verbs and objects), such as the letters CL in the CRTCLPGM (Create CL Program) command.

Some command names consist of the verb only, such as the MOV (Move) command, or an object only, such as the DATA (Data) command.


Exit mobile version