CL command names

The command name identifies the function that will be performed by the program that is called when the command is run. Most command names consist of a combination of a verb (or action) followed by a noun or phrase that identifies the receiver of the action (or object being acted on): (command = verb + object acted on).

Abbreviated words, typically one to three letters, make up the command name. This reduces the amount of typing that is required to enter the command.

For example, you can create, delete, or display a library; so the verb abbreviations CRT, DLT, and DSP are joined to the abbreviation for library, LIB. The result is three commands that can operate on a library: CRTLIB, DLTLIB, and DSPLIB. In another example, one of the CL commands is the Send Message command. You would use the Send Message (SNDMSG) command to send a message from a user to a message queue.

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 Delete Document Library Object (DLTDLO) command.
  • An occasional convention is to use single letters in the middle of the command name (typically between commonly used three-character verbs and objects), such as the letters CL in the Create CL Program (CRTCLPGM) command.

Some command names consist of the verb only, such as the Move (MOV) command, or an object only, such as the Data (DATA) command. A few commands have an IBM® i command name, and can also be called using one or more alternate names that may be familiar to users of systems other than the IBM i system. An alternate name is known as an alias, such as the name CD is an alias for the Change Current Directory (CHGCURDIR) command.