This page is a lookup for WRKSYSVAL: its two parameters, the category values that group system values by topic, and how to produce a printed listing. For changing a value rather than viewing it, see CHGSYSVAL in IBM’s CL reference, which this page does not duplicate. For the command index, see the IBM i Command Reference.
Syntax and parameters
WRKSYSVAL SYSVAL(*ALL | category | generic-name* | name) OUTPUT(* | *PRINT)
| Parameter | Positional | Meaning | Valid values | Default |
|---|---|---|---|---|
SYSVAL | 1 | Which system value(s) to work with. | *ALL, a category value, a generic name ending in *, or one specific system value name. | *ALL. |
OUTPUT | — | Where the result goes. | * (interactive display, or spooled for a non-interactive job); *PRINT (always spooled). | *. |
Category values
| Category | Covers |
|---|---|
*ALC | Allocation system values. |
*DATTIM | Date and time. |
*EDT | Editing (currency symbol, date/time separators, decimal format). |
*LIBL | Library list. |
*MSG | Message and logging. |
*SEC | Security. |
*STG | Storage. |
*SYSCTL | System control. |
A generic name such as QPWD* lists every system value whose name begins with that string, which is a fast way to see every password-related value together without choosing the right category.
Working with one value
WRKSYSVAL SYSVAL(QMAXSIGN)
Naming one system value directly opens the same work-with panel scoped to that single value, with options to display its current setting or change it, subject to the authority CHGSYSVAL requires. This is the fastest path when the exact system value name is already known, instead of filtering a full category list.
Printing instead of displaying
WRKSYSVAL SYSVAL(*SEC) OUTPUT(*PRINT)
OUTPUT(*PRINT) always produces a spooled file, whether the job is interactive or not; OUTPUT(*), the default, displays interactively but falls back to spooled output automatically for a non-interactive job (such as inside a CL program running in batch). Use *PRINT explicitly when the spooled copy itself is the goal, such as evidence for a change-control review.
Authority and change timing
- Authority to display a system value’s current setting is distinct from authority to change it. Changing a value is documented under
CHGSYSVAL, not underWRKSYSVAL. - A user without authority to change a given value receives
CPF1831orCPF1864when attempting a change from theWRKSYSVALpanel, not when only displaying. - Not every system value takes effect immediately. Some apply at once, some only to jobs started after the change, and some only at the next IPL.
WRKSYSVALdoes not report which category a given value falls into. Check the specific system value’s own documentation before assuming an immediate effect.
Common system values by category (not exhaustive)
| Category | Representative values |
|---|---|
*SEC | QMAXSIGN, QMAXSIGNACN, QPWDMINLEN, QPWDMAXLEN, QPWDRULES, QALWOBJRST, QCRTAUT. |
*DATTIM | QDATE, QTIME, QDATFMT, QDATSEP, QTIMZON, QCENTURY. |
*STG | QSTGLOWLMT, QSTGLOWACN, QRCLSPLSTG. |
*SYSCTL | QPFRADJ, QDYNPTYSCD, QMAXACTLVL, QMAXJOB. |
*MSG | QCFGMSGQ, QHSTLOGSIZ, QSTSMSG. |
*ALC | QACTJOB, QTOTJOB, QMAXSPLF, QADLACTJ, QADLTOTJ. |
*EDT | QCURSYM, QDECFMT, QDATFMT, QDATSEP, QTIMSEP. |
*LIBL | QSYSLIBL, QUSRLIBL. |
Treat this table as a starting point for the generic-name search, not a complete inventory. IBM’s reference lists well over a hundred system value names across these categories.
WRKSYSVAL compared with RTVSYSVAL and DSPSYSVAL
Three commands look at system values, and each serves a different purpose:
| Command | Interface | Typical use |
|---|---|---|
WRKSYSVAL | Interactive work-with panel (or a spooled listing with OUTPUT(*PRINT)). | Browsing or changing one or more values by category, generic name, or exact name. |
DSPSYSVAL | Interactive display of one named value, no work-with options. | A quick look at a single value without the option to change it from the same screen. |
RTVSYSVAL | Retrieves one named value into a CL program or REXX variable. | Program logic that needs to branch on a system value, such as checking QSECURITY before a security-sensitive step. |
WRKSYSVAL and DSPSYSVAL are both interactive; RTVSYSVAL is the one to reach for inside a CL program, in the same way the RTVOBJD command retrieves an object’s attributes into variables instead of displaying them on screen.
Common mistakes
- Changing a security-related value (
QMAXSIGN,QPWDRULES, and similar) directly from theWRKSYSVALpanel in a production environment without a documented change window, since several security values affect every signed-on user immediately. - Assuming
OUTPUT(*)always displays interactively; in a batch CL program it is spooled, which can be missed if nobody checks the job’s output queue. - Confusing
WRKSYSVAL, which is interactive work-with, withRTVSYSVAL, which retrieves a single value into a CL variable for program logic, orDSPSYSVAL, which displays one value without the work-with options. - Expecting every listed value to take effect at the same time. Some need a new job or an IPL; a change that appears to do nothing may simply not have taken effect yet.
- Filtering with a generic name that is too broad (such as
Q*) and getting an unmanageably long list; a documented category value is usually a better filter.
FAQ
What is the difference between WRKSYSVAL and DSPSYSVAL?
WRKSYSVAL works with one or more system values interactively, with options to display and (subject to authority) change. DSPSYSVAL displays a single named system value without the work-with options.
How do I print all security-related system values?
WRKSYSVAL SYSVAL(*SEC) OUTPUT(*PRINT) spools a listing of every system value in the security category.
Does changing a system value from WRKSYSVAL take effect immediately?
It depends on the specific value. Some take effect immediately, some only for jobs started afterward, and some only at the next IPL; WRKSYSVAL itself does not state which applies to a given value.
Related references
- IBM i Command Reference: the full command index by task.
- IBM i Job Commands Reference: job-level inspection commands such as
WRKACTJOBandWRKJOB.
Summary
WRKSYSVAL SYSVAL(*ALL | category | generic* | name) OUTPUT(* | *PRINT)is the full parameter set;SYSVALdefaults to*ALLandOUTPUTdefaults to*.- Category values (
*SEC,*DATTIM,*STG,*SYSCTL,*MSG,*ALC,*EDT,*LIBL) group related system values; a generic name or specific name narrows further. - Display authority and change authority differ; a change timing (immediate, next job, or next IPL) depends on the individual system value, not on
WRKSYSVALitself.
Verification
- Parameters, category values, output behavior and authority/change-timing notes checked against IBM’s CL command reference for IBM i 7.5, Work with System Value (WRKSYSVAL) (https://www.ibm.com/docs/en/ssw_ibm_i_75/cl/wrksysval.htm).
- Not run on PUB400 or any other system; the example commands are documentation-derived and not independently executed.