IBM i (AS/400) CL Command Cheat Sheet
Most daily IBM i work in a JD Edwards World shop uses a few dozen CL commands. This sheet groups them by task so a new operator or analyst can find the right one fast.
| Command | Task group | What it does | Practical note |
|---|---|---|---|
WRKACTJOB | Jobs | Work with active jobs | Sort by CPU with F16 style options, check status such as MSGW. |
WRKSBMJOB | Jobs | Work with jobs you submitted | Use to find your own batch jobs. |
WRKUSRJOB | Jobs | Work with jobs for a user | Handy for finding a user's stuck job. |
SBMJOB | Jobs | Submit a job to batch | Specify JOBQ and JOBD to control where and how it runs. |
HLDJOB | Jobs | Hold a job | Pair with RLSJOB. |
RLSJOB | Jobs | Release a held job | Works for jobs on a job queue or active. |
ENDJOB | Jobs | End a job | Use OPTION(*CNTRLD) first, then *IMMED if needed. |
CHGJOB | Jobs | Change attributes of a job | Change priority, output queue or logging level. |
DSPJOBLOG | Jobs | Display a job log | First stop when a job ends abnormally. |
WRKJOBQ | Jobs | Work with job queues | Check whether a queue is held. |
WRKSBS | Subsystems | Work with subsystems | See which subsystems are active. |
WRKSBSJOB | Subsystems | Work with jobs in a subsystem | Filter by SBS name. |
STRSBS | Subsystems | Start a subsystem | Needs the subsystem description. |
ENDSBS | Subsystems | End a subsystem | Use *CNTRLD with a delay for normal shutdowns. |
WRKSYSSTS | System status | Work with system status | Shows CPU, ASP use and memory pool faults. |
WRKDSKSTS | System status | Work with disk status | Look for uneven disk unit utilization. |
WRKSYSVAL | System status | Work with system values | Compare against your standards. |
DSPLOG | System status | Display the history log (QHST) | Search by date range. |
DSPMSG | Messages | Display messages | Use MSGQ(QSYSOPR) for operator messages. |
WRKMSGQ | Messages | Work with message queues | Find unanswered inquiry messages. |
WRKSPLF | Spool | Work with spooled files | Use the output queue column to find lost reports. |
WRKOUTQ | Spool | Work with an output queue | Check for held or released status. |
CPYSPLF | Spool | Copy a spooled file to a database file | Common way to capture report text. |
WRKLIB | Objects | Work with libraries | Supports generic names such as PROD*. |
DSPLIB | Objects | Display objects in a library | OUTPUT(*PRINT) for a listing. |
DSPOBJD | Objects | Display object description | Shows create date and save date. |
WRKOBJLCK | Objects | Work with object locks | First step when a file is locked. |
DSPFD | Files | Display file description | Record count, member and journal details. |
DSPFFD | Files | Display file field description | Lists field names, length and type. |
DSPPFM | Files | Display physical file member | Quick data view without a query tool. |
CPYF | Files | Copy file | Use FMTOPT(*MAP *DROP) for different formats. |
CLRPFM | Files | Clear physical file member | Irreversible without a backup, use carefully. |
STRSQL | SQL | Start interactive SQL | Good for quick checks, F4 prompts help. |
RUNSQLSTM | SQL | Run SQL statements from a source member | Set COMMIT and naming options explicitly. |
ADDLIBLE | Library list | Add library list entry | Use POSITION to control order. |
CHGLIBL | Library list | Change library list | Replaces the user part of the list. |
DSPLIBL | Library list | Display library list | Check this first when a program calls the wrong object. |
CHGCURLIB | Library list | Change current library | New objects are created here. |
SAVLIB | Backup | Save library | Use SAVF or a device. Check for locks first. |
SAVOBJ | Backup | Save objects | For selected objects only. |
SAVCHGOBJ | Backup | Save changed objects | Incremental backup based on reference date. |
SAV | Backup | Save integrated file system objects | Used for IFS directories. |
SAVSECDTA | Backup | Save security data | Saves user profiles and authorities. |
SAVCFG | Backup | Save configuration | Saves device and line descriptions. |
SAVSYS | Backup | Save system | Needs restricted state on a console. |
RSTLIB | Restore | Restore library | Use ALWOBJDIF carefully. |
RSTOBJ | Restore | Restore objects | Specify SAVLIB and device. |
CRTSAVF | Backup | Create save file | Allocate enough space before saving. |
WRKUSRPRF | Users | Work with user profiles | Filter by group profile. |
DSPUSRPRF | Users | Display user profile | Shows special authorities and status. |
CHGUSRPRF | Users | Change user profile | Enable a disabled profile with STATUS(*ENABLED). |
DSPOBJAUT | Users | Display object authority | Check public authority. |
GRTOBJAUT | Users | Grant object authority | Use authorization lists to scale. |
DSPJRN | Journal | Display journal entries | Useful for audit and recovery questions. |
WRKJRNA | Journal | Work with journal attributes | Check receiver size and retention. |
NETSTAT | Network | Work with TCP/IP network status | Look at connections and interface status. |
PING | Network | Test TCP/IP connectivity | Run from the IBM i toward the target. |
STRTCP | Network | Start TCP/IP | Starts interfaces and servers as configured. |
PWRDWNSYS | Power | Power down system | Use *CNTRLD with a delay and RESTART(*NO) or *YES as needed. |
This is a quick lookup, not a replacement for the IBM i documentation. Press F4 on any command on the system to prompt its parameters.
Operations assistant for IBM i teams
Optional: a private assistant that answers 'what is running and why did it stop' from your own job and ERP data.
Optional. The tool and every export work without this. No spam.
How to use the sheet
Search by command, task group or a word such as spool or backup. Each row says what the command does and gives a short practical note. On a green screen, type the command and press F4 to prompt for parameters, or type the command name followed by F1 for help. Export the list to Excel or PDF to keep a laminated style reference for the operations desk.
Commands for troubleshooting a stuck batch job
The usual path is WRKACTJOB to find the job and its status, DSPJOBLOG to read why it stopped, WRKOBJLCK to see if a file lock is the cause, and DSPMSG MSGQ(QSYSOPR) for pending inquiry messages. A job in MSGW status is waiting for a reply. After the fix, release or restart through your job scheduler rather than resubmitting by hand, so the audit trail stays intact.
- WRKACTJOB: status and CPU
- DSPJOBLOG: reason for failure
- WRKOBJLCK: lock holder
- DSPMSG: inquiry messages
Backup and restore commands
SAVLIB, SAVOBJ, SAVCHGOBJ, SAV, SAVSECDTA and SAVCFG together cover data libraries, changed objects, the integrated file system, user profiles and configuration. SAVSYS covers the operating system and needs restricted state. A restore with RSTLIB is only as good as the last verified save, so test restores on a non-production partition on a schedule.
Common mistakes
CLRPFM and DLTF cannot be undone without a backup. ENDJOB with *IMMED can leave files in an inconsistent state, so try *CNTRLD first. CHGLIBL replaces the user part of the library list for the job, which can break later calls. Check DSPLIBL before and after changing it, and never test destructive commands on a production library.
Frequently Asked Questions
What is the difference between SAVLIB and SAVOBJ?
SAVLIB saves an entire library with its objects. SAVOBJ saves only the objects you name or select. Use SAVLIB for scheduled full saves and SAVOBJ or SAVCHGOBJ when you need a smaller targeted or incremental save.
How do I find who has a file locked?
Run WRKOBJLCK with the object name, library and type. It shows each job holding a lock and the lock state. You can then look at that job in WRKACTJOB to decide whether to wait, message the user or end the job.
Can I run these commands from SQL?
Yes, on supported releases you can use QSYS2.QCMDEXC to run a CL command from SQL, and many commands have SQL service equivalents in QSYS2. Behavior depends on release level, so test on a non-production system first.
Are these commands specific to JD Edwards World?
No. They are standard IBM i commands. JD Edwards World adds its own menus and objects on top, but the operating system tasks for jobs, spool, library lists and backup use the same commands on any IBM i.
If your team spends time on manual checks, Netray can build a read-only assistant that answers operational questions from your IBM i and ERP data on your own servers.
Related Tools
IBM i System Values Reference
A searchable table of the IBM i system values that matter for security, date handling, job limits and startup, with the reason each one is checked.
Developer ToolsDb2 for i SQL Services Query Generator
Fill in a library, object type and subsystem and get a set of QSYS2 SQL services queries for sizes, row counts, jobs, locks and user profiles.
OracleIBM i OS Upgrade Readiness Checklist
A grouped checklist covering planning, backup, compatibility, the upgrade weekend and validation for an IBM i operating system upgrade.
ERP Migration & SelectionRPG and CL Program Inventory Worksheet
List your custom programs with language, size, files used and owner, and get a simple complexity score to prioritise what to retire, keep or rewrite.
More Oracle tools
See all- JDE World DREAM Writer Version Documentation Template
- JD Edwards World Key File Reference Table
- JD Edwards World to EnterpriseOne Data Conversion Mapping Worksheet
- JD Edwards World Custom Program and Modification Inventory Worksheet
- IBM i Power Hosting Cost Comparison Calculator
- JD Edwards World Custom Object Conversion Effort Calculator
- IBM i Batch Window Capacity Calculator
- AS/400 Disk Storage Growth Forecast Calculator
- IBM i Restore Time and RTO Calculator