Control Language (CL) is a set of commands used to control operations and request system-related functions on the IBM i System, and on the earlier generation AS400 and iSERIES machines. The purpose of CL is comparable to Job Control Language (JCL) on mainframe computers, but CL offers greater functionality.

Here are some key purposes and features of CL:

  • Controlling system operations: CL commands allow users to manage various aspects of the AS/400 system, such as creating libraries, managing output queues, and controlling job processing.
  • Requesting system functions: Users can employ CL commands to request specific actions from the system, like retrieving object information or displaying user profiles.
  • Batch processing: CL commands can be grouped together into CL programs that can be compiled and executed in batch mode.
  • Interactive use: CL commands can be entered directly on the AS/400 command line for interactive execution.
  • File management: CL includes commands for file operations like copying, redirecting output, and creating directories, similar to PC-DOS commands.

While CL is feature-rich, it is not considered a high-level language suitable for complex applications like payroll processing.

The naming convention for CL commands is based on English and typically combines a verb and a noun, such as CRTLIB (Create Library). Examples of CL commands include ADDLIBLE (Add Library List Entry), CHGPGM (Change Program), and DSPOBJAUT (Display Object Authority).

1. The Role of CL on IBM i

Control Language (CL) is the command-and-scripting language used to interact with, manage, and automate tasks on the IBM i operating system. Think of it as the IBM i equivalent of a command-line toolkit combined with a lightweight scripting language. CL lets you control system functions, run programs, manage jobs, manipulate files, and orchestrate workflows across the system.

CL is deeply integrated into the IBM i environment. Every time you run a command from creating a library to submitting a job you’re using a CL command behind the scenes. This makes CL both a user interface and a programming language.

2. CL as a Command Language

At its simplest, CL is a collection of commands you can run interactively or inside scripts. Examples include:

  • CRTLIB Create a library
  • WRKJOB Work with jobs
  • SBMJOB Submit a job
  • DSPPFM Display a physical file member

Each command follows a consistent structure with named parameters, making it easy to read and understand. This consistency is one of the reasons CL remains so approachable for new IBM i developers.

3. CL as a Programming Language

Beyond single commands, CL can be used to write full programs. A CL program allows you to:

  • Call RPG, COBOL, or other CL programs
  • Check conditions and branch logic
  • Loop through operations
  • Handle messages and job status
  • Automate multi-step workflows

A simple CL program might submit a job, copy a file, send a message, and call an RPG program all in one script. This makes CL ideal for automation, batch processing, and system administration tasks.

4. Why CL Still Matters Today

Even in modern IBM i development, CL remains essential because:

  • It’s the easiest way to automate system tasks
  • It integrates tightly with IBM i job management
  • It acts as the “glue” between RPG programs, SQL scripts, and system utilities
  • It’s simple, readable, and reliable

Whether you're a system admin or an RPG developer, understanding CL gives you control over the IBM i environment in a way no other language does.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>