Strovent SystemsSign in
Reference

IBM i CL basics

How IBM i Control Language commands are named, how to prompt them, and commands for jobs, spool files and messages.

CL (Control Language) is the IBM i command language. You can type a command on any IBM i command line, and the same commands are used in CL programs.

How commands are named

A command is a verb and an object: WRK (work with) + ACTJOB (active jobs), DSP (display) + MSG (messages), CRT (create) + LIB (library), CHG (change), DLT (delete), ADD, RMV, STR (start), END, SAV (save), RST (restore).

Prompting and help

  • Type a command and press F4 to see its parameters with defaults. Fill them in and press Enter.
  • Put ? before a command to prompt it. Press F1 on a parameter for help.
  • F9 on the command line retrieves the commands you typed before.
  • F11 shows keywords in the prompt.
  • Special values begin with *, such as *ALL, *LIBL and *CURLIB.

Everyday commands

GO MAIN          the main menu (GO CMDxxx shows a command menu)
WRKACTJOB        active jobs; option 5 to work with a job, 4 to end
WRKSBMJOB        jobs you submitted
WRKSPLF          your spooled output
WRKOUTQ queue    output in a queue
DSPMSG           your messages
DSPJOBLOG        the job log of the current job
WRKSYSSTS        system status and disk use
WRKSYSVAL        system values
DSPLIBL          your library list
ADDLIBLE lib     add a library to the list
WRKLIB lib       work with objects in a library
WRKOBJ obj       work with objects by name
CALL PGM(lib/prog)    run a program
STRSQL           interactive SQL
SIGNOFF          end the session

Names

Objects are qualified by library: MYLIB/MYFILE. *LIBL means "search the library list". See IBM i objects and libraries.

The command entry display

Run CALL QCMD for a Command Entry screen. It keeps the history of commands and their messages. F10 there includes detailed messages. If a menu has no command line at all, see IBM i screen has no command line: GO MAIN, CALL QCMD and LMTCPB.

Spotted a mistake? Email [email protected].