IBM AS/400 (IBM i) Cheat Sheet

A reference for the IBM i (AS/400, OS/400) command line, the work-with commands, libraries and objects, spooled files and output queues, messages, and 5250 function-key shortcuts.

A quick reference to IBM i (AS/400, OS/400) control-language (CL) commands. Replace LIB, FILE, and USRPRF with your own names. Most commands are verb-object form (Work, Display, Create) and can be prompted with F4.

Sign-on & sessions

CommandWhat it does
SIGNOFFSign off the current session (add *LIST to keep spooled files)
DSPJOBDisplay details of your current job
WRKUSRPRF USRPRF(USRPRF)Work with a user profile
CHGPRFChange your user profile defaults (language, outq)

Work-with commands

CommandWhat it does
WRKACTJOBWork with active jobs and their status
WRKUSRJOB USRPRF(*CURRENT)Work with your own jobs
WRKOBJ OBJ(LIB/*ALL)Work with objects in a library
WRKSBMJOBWork with submitted (batch) jobs
WRKDEVDWork with device descriptions (displays, printers)

Libraries & objects

CommandWhat it does
DSPLIBDisplay the contents of a library
DSPLIBLDisplay your current library list
ADDLIBLE LIB(LIB)Add a library to your library list
CRTLIB LIB(LIB)Create a new library
DSPOBJD OBJ(LIB/OBJ) OBJTYPE(*ALL)Display an object's description

Files & source members

CommandWhat it does
STRPDMStart the Programming Development Manager
WRKMBRPDM FILE(LIB/FILE)Work with the members of a source file
DSPPFM FILE(LIB/FILE)Display a physical file member
CPYF FROMFILE(LIB/A) TOFILE(LIB/B)Copy a file
EDTF STMF('/path/file.txt')Edit an IFS stream file

Messages & output

CommandWhat it does
DSPMSGDisplay your messages
SNDMSG MSG('text') TOUSR(USRPRF)Send a message to a user
WRKSPLFWork with your spooled files (printouts)
WRKOUTQ OUTQ(LIB/OUTQ)Work with an output queue

System

CommandWhat it does
WRKSYSSTSWork with system status (CPU, disk, pools)
DSPSYSVAL SYSVAL(QDATETIME)Display a system value
GO MAINOpen the MAIN menu
GO CMDWRKOpen the menu of Work commands to browse related CL commands

Tip: press F4 to prompt any command with a fill-in form of its parameters, F1 for help on a field, F9 to retrieve your last command, and F3 to exit. To discover commands, type GO CMDxxx for a verb (for example GO CMDDSP for all Display commands).

What this does

An IBM AS/400 (IBM i, OS/400) cheat sheet gathers the control-language (CL) commands and 5250 function keys you use every day — work-with commands, libraries and objects, spooled files, messages, and system status.

How to use it

  1. Browse by section.
  2. Find the command you need.
  3. Copy it with one tap.
  4. Type it at a command line and press Enter.

Example

WRKACTJOB shows every active job and its status.

Sources & methodology

Last updated .

Frequently asked questions

What is a CL command?

A control-language (CL) command is a built-in IBM i instruction, almost always in verb-object form such as WRKACTJOB (Work with Active Jobs) or DSPLIB (Display Library). Type it at a command line and press Enter.

How do I find or prompt a command?

Type the command and press F4 to prompt it with a fill-in form of its parameters, or press F1 on any field for help. To find a command, type a partial verb-object and press F4 to list the matches.

What do the function keys do?

F3 exits most screens, F12 cancels back to the previous one, F4 prompts a command, F9 retrieves your last command, and F1 shows help. The exact meaning can vary by screen, so check the bottom legend.