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.
WRKACTJOB→Work with Active Jobs
Jobs and subsystems
WRKACTJOBWork with Active Jobs
List of active jobs with CPU, status and subsystem: where you start when "the system is slow".
Main parameters of WRKACTJOB
SBS
Limit to one subsystem
CPUPCTLMT
Show only jobs above this CPU percentage
SEQ
Sort order: *SBS, *CPUPCT, *JOB
RESET
*YES resets the displayed counters
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
WRKUSRJOBWork with User Jobs
Jobs of a single user, including ended ones that left spooled output.
Main parameters of WRKUSRJOB
USER
User profile to look at
STATUS
*ACTIVE, *JOBQ, *OUTQ, *ALL
JOBTYPE
Job type: *ALL, *BATCH, *INTERACT
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
WRKJOBWork with Job
Everything about one job: log, open files, library list, spooled files produced.
Main parameters of WRKJOB
JOB
Job as number/user/name
OPTION
*SELECT, *JOBLOG, *SPLF, *FILE, *LIBL
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
WRKSBMJOBWork with Submitted Jobs
The jobs you submitted yourself: the quickest way to find a batch you just launched.
Main parameters of WRKSBMJOB
SBMFROM
*JOB, *USER, *WRKSTN
JOB
Filter by job name
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
SBMJOBSubmit Job
Sends a command to run in batch instead of interactively.
Main parameters of SBMJOB
CMD
The command to run in batch
JOB
Name to give the job
JOBD
Job description to use
JOBQ
Queue to submit it to
USER
Profile to run it under
SCDDATE / SCDTIME
Scheduled run date and time
LOG
Job log detail level
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
ENDJOBEnd Job
Ends a job. With OPTION(*IMMED) it skips the orderly shutdown: use with care.
Main parameters of ENDJOB
JOB
Job to end
OPTION
*CNTRLD orderly shutdown, *IMMED immediate
DELAY
Seconds allowed before forcing
SPLFILE
*YES keeps the spooled files produced
LOGLMT
Log lines to write
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
HLDJOB / RLSJOBHold / Release Job
Suspends and resumes a job without ending it.
Main parameters of HLDJOB / RLSJOB
JOB
Job to hold or release
SPLFILE
*YES holds its spooled files too
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
CHGJOBChange Job
Changes priority, output queue or date format of a job already running.
Main parameters of CHGJOB
JOB
Job to change (blank = current one)
RUNPTY
Run priority, 1 to 99
OUTQ
Default output queue
DATFMT
Date format: *ISO, *DMY, *MDY, *YMD, *JUL
LOG
Job log detail level
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
WRKJOBQWork with Job Queue
Contents of the job queues: what is waiting and in what order.
Main parameters of WRKJOBQ
JOBQ
Queue to look at (library/name)
OUTPUT
* to screen, *PRINT to printer
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
WRKSBSWork with Subsystems
Active subsystems and how many jobs each is carrying.
Main parameters of WRKSBS
SBS
Subsystem (blank = all)
OUTPUT
* to screen, *PRINT to printer
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
DSPJOBLOGDisplay Job Log
A job log. F10 shows the detailed messages, the ones that actually matter.
Main parameters of DSPJOBLOG
JOB
Job whose log to view
OUTPUT
* to screen, *PRINT to printer
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
Printing and spool
WRKSPLFWork with Spooled Files
Your queued printouts: view them, hold them, move them to another queue.
Main parameters of WRKSPLF
SELECT
User, queue, form type, user data
ASTLVL
Interface assistance level
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
WRKOUTQWork with Output Queue
A whole output queue, with every user's spooled files.
Main parameters of WRKOUTQ
OUTQ
Output queue (library/name)
OUTPUT
* to screen, *PRINT to printer
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
WRKWTRWork with Writers
Printer writers: when a queue will not print, the writer is usually stopped.
Main parameters of WRKWTR
WTR
Writer name (*ALL for all)
OUTQ
Limit to one queue
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
CPYSPLFCopy Spooled File
Copies a spooled file into a database file, to reread it or send it elsewhere.
Main parameters of CPYSPLF
FILE
Name of the spooled file to copy
TOFILE
Target database file
JOB
Job that produced the spooled file
SPLNBR
Spooled file number within the job
MBROPT
*REPLACE overwrites, *ADD appends
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
System and performance
WRKSYSSTSWork with System Status
Memory, pools and paging. Faults per pool are the first clue when performance drops.
Main parameters of WRKSYSSTS
OUTPUT
* to screen, *PRINT to printer
RESET
*YES resets counters since last sample
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
WRKDSKSTSWork with Disk Status
Disk usage and busy percentage, arm by arm.
Main parameters of WRKDSKSTS
OUTPUT
* to screen, *PRINT to printer
RESET
*YES resets the counters
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
WRKSYSACTWork with System Activity
Real-time CPU usage per job (requires Performance Tools).
DSPSYSVAL / CHGSYSVALDisplay / Change System Value
Reads and changes a system value (QDATFMT, QCCSID, QTIME…).
Main parameters of DSPSYSVAL / CHGSYSVAL
SYSVAL
System value name (e.g. QDATFMT)
VALUE
New value, CHGSYSVAL only
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
WRKSYSVALWork with System Values
List of system values, filterable by category.
DSPLOGDisplay Log
The QHST system log: who signed on, what started, what went wrong.
Main parameters of DSPLOG
LOG
Log to read: QHST
PERIOD
Date and time range
MSGID
Filter by message identifier
OUTPUT
* to screen, *PRINT to printer
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
WRKPRBWork with Problems
Log of problems detected by the system, with the data to hand to support.
PWRDWNSYSPower Down System
Powers the machine down. RESTART(*YES) to reboot. Handle with extreme care.
Main parameters of PWRDWNSYS
OPTION
*CNTRLD orderly, *IMMED immediate
DELAY
Seconds allowed before forcing
RESTART
*YES reboots, *NO stays off
IPLSRC
IPL source for the restart
The most-used parameters, not the full list: on the system, F4 on the command shows them all with their defaults.
WRKHDWRSCWork with Hardware Resources
Hardware resources as the system sees them (*CMN for network, *STG for disks).