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 (SIGNOFF LOG(*LIST) also spools the job log for printing)
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 USER(*)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
DSPLIB LIB(LIB)Display the contents of a library (plain DSPLIB shows every library in your list)
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) MBROPT(*REPLACE) CRTFILE(*YES)Copy a file, creating B if it doesn’t exist (*REPLACE clears B’s member first; use *ADD to append)
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 (jobs, disk/ASP use, storage pools)
DSPSYSVAL SYSVAL(QDATETIME)Display a system value
GO JOBOpen a menu by name (here the Jobs menu); the name is shown at the top left of most menus

Tip: press F4 to prompt any command with a fill-in form of its parameters, F1 for help on a field (or type ? in it), F9 to retrieve your last command, F12 to cancel back and F3 to exit. The keys a screen supports are listed along its bottom line.

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.

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.

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.