IBM i commands
The operating system uses control language (CL) commands to interpret instructions from users. You need to know the basic rules for using CL, and how to get detailed help for any CL command.
CL provides a powerful and flexible means of entering commands on the system. You can use CL to control most of the operating system functions by entering them from the character-based interface or by including them in programs. While the IBM i menu system and CL commands might be unfamiliar at first, they follow an easy-to-use syntax, and the operating system includes many features to help you use them successfully.
CL command syntax
CL commands consist of a verb, an object, and sometimes an adjective; for example, WRKACTJOB:
Verb | Adjective | Object |
---|---|---|
WRK | ACT | JOB |
Work | Active | Job |
One of the important features of CL syntax is that it is consistent. For example, regardless of the object or command you want to work with, using the verb WRK in the command starts a menu that allows you to perform the available actions on the specified object.
Entering CL commands
You can enter CL commands from any command line and most displays on the character-based interface.
Every command has a set of required and optional parameters. For example, Create Library (CRTLIB) requires, at a minimum, that you specify the name of the library that you want to create. The syntax for more complex CL commands is command_name
parameter (value). For example, CRTLIB LIB (FRED) enters the verb create on the object type library, and specifies that the required parameter LIB, the library name, must have the value FRED. This command causes the operating system to create a library called FRED.
If you are not familiar with the parameters associated with a CL command, you can enter the command with the parameters you already know, place the cursor on the command, and press F4 (Prompt). The system then displays the available options for the command. Entering a command without any parameters also causes the system to prompt you for any required fields, making field-level help available. For example, entering CRTLIB causes the system to show the following display.

Entering a ? in any field brings up detailed help for that parameter.
Getting help with CL commands
The operating system provides several methods for helping users access and enter CL commands. The Command Entry program provides a useful interface and additional help. You can start this program by entering CALL QCMD from a command line. The CL finder in the information center can also help you find a specific command. Most importantly, remember that entering a command without any parameters, or pressing F4 (Prompt) while your cursor is over the command, displays a menu with detailed help for all associated parameters.