Reference lists

Reference

CL commands with the abbreviation spelled out, CPF and SQLCODE messages with the most frequent cause, IBM i Services with the corresponding command. Searchable lists.

CL command reference

84 commands with the abbreviation spelled out, because that is how you actually remember them.

WRKACTJOBWork with Active Jobs

Jobs and subsystems

WRKACTJOB Work with Active Jobs

List of active jobs with CPU, status and subsystem: where you start when "the system is slow".

WRKUSRJOB Work with User Jobs

Jobs of a single user, including ended ones that left spooled output.

WRKJOB Work with Job

Everything about one job: log, open files, library list, spooled files produced.

WRKSBMJOB Work with Submitted Jobs

The jobs you submitted yourself: the quickest way to find a batch you just launched.

SBMJOB Submit Job

Sends a command to run in batch instead of interactively.

ENDJOB End Job

Ends a job. With OPTION(*IMMED) it skips the orderly shutdown: use with care.

HLDJOB / RLSJOB Hold / Release Job

Suspends and resumes a job without ending it.

CHGJOB Change Job

Changes priority, output queue or date format of a job already running.

WRKJOBQ Work with Job Queue

Contents of the job queues: what is waiting and in what order.

WRKSBS Work with Subsystems

Active subsystems and how many jobs each is carrying.

DSPJOBLOG Display Job Log

A job log. F10 shows the detailed messages, the ones that actually matter.

Printing and spool

WRKSPLF Work with Spooled Files

Your queued printouts: view them, hold them, move them to another queue.

WRKOUTQ Work with Output Queue

A whole output queue, with every user's spooled files.

WRKWTR Work with Writers

Printer writers: when a queue will not print, the writer is usually stopped.

CPYSPLF Copy Spooled File

Copies a spooled file into a database file, to reread it or send it elsewhere.

System and performance

WRKSYSSTS Work with System Status

Memory, pools and paging. Faults per pool are the first clue when performance drops.

WRKDSKSTS Work with Disk Status

Disk usage and busy percentage, arm by arm.

WRKSYSACT Work with System Activity

Real-time CPU usage per job (requires Performance Tools).

DSPSYSVAL / CHGSYSVAL Display / Change System Value

Reads and changes a system value (QDATFMT, QCCSID, QTIME…).

WRKSYSVAL Work with System Values

List of system values, filterable by category.

DSPLOG Display Log

The QHST system log: who signed on, what started, what went wrong.

WRKPRB Work with Problems

Log of problems detected by the system, with the data to hand to support.

PWRDWNSYS Power Down System

Powers the machine down. RESTART(*YES) to reboot. Handle with extreme care.

WRKHDWRSC Work with Hardware Resources

Hardware resources as the system sees them (*CMN for network, *STG for disks).

DSPSFWRSC Display Software Resources

Installed software products and their licences.

WRKPTFGRP Work with PTF Groups

Installed PTF groups and their level: the first check before an upgrade.

Objects and libraries

WRKOBJ Work with Objects

Finds objects by name and type, generic names allowed (ORD* finds everything starting with ORD).

DSPOBJD Display Object Description

An object's card: size, creation date, last used, who changed it.

WRKLIB Work with Libraries

List of libraries, with size and object count.

CRTLIB / DLTLIB Create / Delete Library

Creates and deletes a library.

DSPLIBL Display Library List

The current job's library list, in the order it is searched.

ADDLIBLE / RMVLIBLE Add / Remove Library List Entry

Adds or removes a library from the job's list.

CRTDUPOBJ Create Duplicate Object

Copies an object, with or without data: the clean way to take a quick backup.

MOVOBJ / RNMOBJ Move / Rename Object

Moves an object to another library, or renames it.

ALCOBJ / DLCOBJ Allocate / Deallocate Object

Locks an object for exclusive use, then releases it.

WRKOBJLCK Work with Object Locks

Who is holding a lock on an object: the answer to "I cannot change this file".

Files and data

DSPFD Display File Description

Full description of a file: members, record count, layout, attached journal.

DSPFFD Display File Field Description

A file's fields one by one, with type, length and decimals.

DSPPFM Display Physical File Member

Look at a file's data without writing a query. F10 switches to hex view.

DSPDBR Display Database Relations

What depends on this file: logicals, views and constraints. Check before deleting.

CPYF Copy File

Copies records between files. With FMTOPT(*MAP *DROP) it works across different layouts too.

CLRPFM Clear Physical File Member

Empties a member of all its records.

RGZPFM Reorganize Physical File Member

Reclaims deleted-record space and reorders the file by a key.

RUNSQLSTM Run SQL Statements

Runs an SQL script from source: the right way to keep DDL under version control.

STRSQL Start SQL Interactive Session

Interactive SQL session on the terminal.

RUNQRY Run Query

Quickly browse a file's contents, even without a defined query.

OVRDBF / DLTOVR Override / Delete Override with Database File

Redirects a file used by a program to another file or member, then cancels the redirect.

OPNQRYF Open Query File

Filters and sorts a file before the program reads it, without creating a logical.

STRJRNPF Start Journal Physical File

Turns on journaling for a file: required for commitment control and replication.

DSPJRN Display Journal

Reads journal entries: who changed that record, when, and to what value.

Development

STRPDM Start Programming Development Manager

The menu you navigate libraries, objects and source members from.

WRKMBRPDM Work with Members Using PDM

The members of a source file, with options to compile (14) and edit (2).

STRSEU Start Source Entry Utility

The classic green-screen editor. RDi or VS Code are more common today, but this is on every machine.

CRTBNDRPG Create Bound RPG Program

Compiles an RPG source into a runnable program in one step.

CRTRPGMOD / CRTPGM Create RPG Module / Create Program

Two-step compile: module first, then bind into a program (needed for multi-module programs).

CRTSRVPGM Create Service Program

Creates a service program: the IBM i way to share a library of functions.

CRTBNDCL Create Bound CL Program

Compiles a CL source into a program.

DSPPGMREF Display Program References

Which files and programs a program uses: the fastest way to see what breaks if you touch a file.

STRDBG Start Debug

Starts debugging: breakpoints and variable inspection while the program runs.

UPDPGM / UPDSRVPGM Update Program / Service Program

Replaces a single module inside an already-bound program, without rebuilding it.

MONMSG Monitor Message

In CL: traps an error instead of letting the program end. CPF0000 catches everything.

SNDPGMMSG / RCVMSG Send / Receive Program Message

Sends and receives messages between CL programs: the standard way to pass errors and info around.

RTVCLSRC Retrieve CL Source

Recovers the source of a compiled CL program when the original source is gone.

Users and security

WRKUSRPRF Work with User Profiles

List of user profiles, with create, change and delete.

CHGUSRPRF Change User Profile

Changes a profile: class, special authorities, initial library list.

DSPUSRPRF Display User Profile

Shows a profile. TYPE(*OBJOWN) lists everything it owns.

EDTOBJAUT Edit Object Authority

Edits rights on an object directly, user by user.

GRTOBJAUT / RVKOBJAUT Grant / Revoke Object Authority

Grants and revokes authority, in bulk across objects too.

WRKAUTL Work with Authorization Lists

Authorization lists: manage rights for many objects in one place.

CHGDLTPRF Change Delete Profile

Reassigns a profile's objects before deleting it, so nothing is left orphaned.

Network and IFS

CFGTCP Configure TCP/IP

TCP/IP configuration menu: interfaces, routes, hosts, DNS.

NETSTAT Work with TCP/IP Network Status

Connections and listening ports. Option 3 for ports, 4 for interfaces.

PING Verify TCP/IP Connection

Checks whether a host is reachable from the IBM i machine.

STRTCPSVR / ENDTCPSVR Start / End TCP/IP Server

Starts and stops TCP servers (*HTTP, *FTP, *TELNET…).

WRKCFGSTS Work with Configuration Status

Status of lines, controllers and devices: this is where you see if something is varied on.

VRYCFG Vary Configuration

Varies a configuration resource on or off.

WRKLNK Work with Object Links

The IFS browser: folders and files on the "Unix side" of the machine.

EDTF Edit File

Edits an IFS file (or a source member) straight from the terminal.

QSH / STRQSH Start QShell

Unix-style shell inside IBM i: handy for scripts, curl, java and system commands.

Backups

SAVLIB / RSTLIB Save / Restore Library

Saves and restores a whole library.

SAVOBJ / RSTOBJ Save / Restore Object

Saves and restores individual objects.

SAVCHGOBJ Save Changed Objects

Saves only what changed since a given date: the basis of incremental backup.

CRTSAVF Create Save File

Creates a save file, the on-disk container that lets you save without tape.

GO SAVE menù di salvataggio

The guided save menu: option 21 for a full system save.

Is a tool you would often use missing? Let us know, gladly.