CL Programming, Introduction

AS400 Control Language

Written by AS400i · 1 min read >
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.


Physical File in AS400

Physical files in AS400

in Introduction
  ·   6 min read

IBM Rational Developer for i

in Introduction, User Interface
  ·   2 min read

23 Most Common AS400 Commands

in AS400 Commands, Introduction
  ·   4 min read

14 Replies to “AS400 Control Language”

  1. Can I simply just say what a relief to find somebody who really knows what they’re discussing on the net. You definitely know how to bring an issue to light and make it important. A lot more people ought to look at this and understand this side of your story. It’s surprising you’re not more popular since you definitely have the gift.

  2. I like the helpful information you supply on your articles.
    I’ll bookmark your weblog and test once more right here frequently.
    I’m moderately certain I will learn lots of new stuff proper here!

    Best of luck for the next!

why dont you add your experience here

%d bloggers like this: