05
Tue, Nov
5 New Articles

AS/400 Basics: System Values

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

System Values

by Craig Pelkie

Among all of the aspects of the AS/400 that you must learn, there is an unobtrusive yet potentially profound entity known as a "system value." IBM groups the many system values into eight categories. Some of these values are set as part of the "shipped system," meaning that the value is initially assigned when you install OS/400. Other values are set as the result of system operations. You can query the current setting of all system values, and you can change most, but not all, to different values.

If you are unfamiliar with system values, you should read this article as well as the section in the Work Management Guide (SC21-8078) that describes them. Sometimes a change that you want to make to your system is done by setting a system value, and if you don't know about it, it can be quite vexing to try to determine how to make the system behave the way you want it to.

Short and Sweet

System values are not "objects," so they are unlike anything else that is stored in the system. Regardless, each system value comprises two elements: the name of the system value and the current value. In keeping with AS/400 conventions, all system value names begin with the letter "Q" and use a more or less mnemonic convention for the rest of the name. For example, the name of the autoconfiguration system value is QAUTOCFG. If you are familiar with AS/400 command naming conventions, you will see the similarity between command and system value names. However, unlike commands, it is difficult to "guess at" system value names.

Prior to Release 3, you would usually have to refer to one of the charts to determine the name and meaning of a system value. One of the nice ease-of-use features that is new with Release 3 is the WRKSYSVAL (Work with System Value) command. That command displays a list of system values, the type of system value, and a description of the value. You can use options on the display to change or display the actual value.

You generally set system values when you install a new release of OS/400. If you are updating from a previous release, you will want to make a note of any system values that you changed, since you will have to change them after the release is installed. For the system values that you can change, you can change them at any time, using either the WRKSYSVAL display or the CHGSYSVAL (Change System Value) command. You can use the CHGSYSVAL either interactively or in a CL program.

When you change a system value, the change may take effect immediately, at job initiation time, or at the next IPL. You must review the manual for each value that you change to determine when the change takes effect. If you are one of those shops that seldom IPLs, be aware of this, as you may have to IPL to get the new value to take effect.

Types of System Values

IBM groups system values into eight types. Date and time values are used to set the system date and time. Editing values are used in your programs or by OS/400 to control the currency symbol, the decimal and date formats. An especially lengthy and interesting group of system values are the System Control values, which are concerned with configuration, IPL, and other operational features. Library List system values let you set the system library list and the user library list. Allocation system values are used to set initial numbers of active jobs, spooling control, and message queue sizing. Message and Logging values are used to control history and problem logging. Storage system values can have a great impact on system performance; they determine the size and activity level of system storage pools. And finally, security values are used to control sign-on and passwords, among other things.

Rather than discuss all of the system values, I will point out the ones that may be of immediate interest. Many of the values are used to control aspects of the system that, in themselves, warrant entire articles, which we will cover in Midrange Computing in the future.

Setting the Clock

In the United States, and, for all I know, in other parts of the world, there is a need to adjust the clock twice a year. You can set the clock by using the CHGSYSVAL command (or the WRKSYSVAL display). For example, if the current system clock is set to 10:00 AM, you can change it to 11:00 AM with this command: CHGSYSVAL QHOUR '11'. Oddly enough, the QHOUR value is a character value, not numeric, so you have to enclose it in quotes. If you forget the quotes, the system does not accept the command. The charts in the Work Management Guide tell you whether a value is character or numeric, as well as the length of the value. You also must enter valid values; for example, you cannot enter QHOUR as '25'. You can also set QMINUTE, and if you are very precise, QSECOND, or you can set all of these at once with QTIME. (QTIME lets you specify to the thousandth of the second. I am happy if my clock is within a few minutes of the "right" time.)

You can also set the year, month and day, separately or all together, with QYEAR, QMONTH, QDAY and QDATE. If you have a preference for a different date format or date separator character, you can set those with QDATFMT (date format) and QDATSEP (date separator). The date format in the U.S. is MDY, month, day, year, and the separator is the "/" character. You can specify DMY or YMD for the date format, and you can set the separator to any character you want. You will see the effect of the date separator on system displays that show the date; that character is also used when you use the "Y" edit code in RPG programs.

System Control

There are a few system values for System Control that you may want to investigate. One of the problem areas that some sites have is with the autoconfiguration capability of the AS/400. If you do not want to let the system automatically create device descriptions for you, you can set QAUTOCFG to '0' (most of the system values that have "yes" or "no" responses use "1" and "0" to indicate those settings). Closely allied with QAUTOCFG is QDEVNAMING, device naming convention. You have three choices here: "*NORMAL" for AS/400 standards (such as DSP01 and PRT01), "*S36" for a System/36 type scheme (W1, P1) and "*DEVADR" which makes up a name from the device address. Many of the complaints that people have about automatic configuration is that the device names are not that meaningful to them; for example, many sites assign device name based on department or location. Obviously, the AS/400 knows nothing about your preferences in naming, so it offers these three alternatives. Another value that will have a great effect on you is QSPCENV, default special environment. This can be either "*S36" or "*NONE". The *S36 setting means that you are put into the S/36 environment when you sign on. If you are migrating from an actual S/36 to the AS/400 S/36 Environment, and then to native AS/400, you may want to keep this value in mind. Someday you will want to change it.

One of the values that can generate a great deal of discussion is QPFRADJ, performance adjustment. If this is set on (1), then your system will adjust various pool sizes and activity levels at the next IPL. If you are trying to control those settings yourself, you will certainly want to change this to "0", since the shipped setting is "1".

For software vendors, two interesting system values are QMODEL, machine model number, and QSRLNBR, system serial number. These are "read only" values, meaning that they can't be changed with the CHGSYSVAL or WRKSYSVAL commands. The usual practice with these types of values is to retrieve them in a CL program with the RTVSYSVAL command. The setting of the retrieved system value can be placed into a CL variable, which is then used like any other variable.

There are some other system control values that you may want to investigate. Some of them are used if you have a UPS attached to your system. Others control various activities at IPL time, such as running a start-up program, starting print writers, and assigning a controlling subsystem.

Library Lists

You can set the system and user parts of the library lists with the QSYSLIBL and QUSRLIBL commands. You should review the September 1990 issue of Midrange Computing for a discussion of library lists in the "AS/400 Basics" article.

System Security

Within the security type of system values, there are several values that you will want to consider. Of primary importance is QSECURITY, the security level indicator. This is 10, 20, 30 or 40, and the implications of each setting are worthy of many articles. You probably have already set this, but if you have not, and are still operating at security level 10 (the shipped value), this is where it is.

Another interesting value is QMAXSIGN, maximum number of invalid sign-on attempts. This is shipped at a rather high 15; many installations that I have seen set this to 3. Granted, it may be difficult to enter a nondisplay password, but three tries should be enough.

An interesting combination that may solve an age-old problem is QINACTITV and QINACTMSGQ. QINACTITV sets a time-out interval in minutes for inactive jobs. For example, if your users get up and wander away from a signed-on terminal, you can indicate that somewhere between 5 and 300 minutes, you want to know about it. This value is initially shipped as "*NONE", meaning that the system is not monitoring jobs for inactivity. You control how you get to know about it with QINACTMSGQ, the message queue to receive job inactive messages. You can indicate that the message for the inactive job is sent to a specific message queue, where you would presumably have a program monitoring the arrival of the message. You can then programmatically take control of the inactive job. You can also cause the job to end by specifying "*ENDJOB" or to disconnect by specifying "*DSCJOB." If you use "*DSCJOB," you can control how long the disconnected job remains disconnected before it is forced to end, by placing a time interval in system value QDSCJOBITV. Using this disconnect approach over the end job approach can give you security without concern about the interactive job being terminated.

Also in the security category of system values, there are several values that control how passwords are formulated and changed. This seems to have migrated down from the mainframe folks, and you will have to review these settings to decide if you want to get that involved with password rules.

Dealing with System Values

The easiest way to work with system values is WRKSYSVAL. That displays the name and description of the value, and allows easy access to the setting. You can still use the DSPSYSVAL (Display System Value) command, but you have to type in the name of the value, and you get to see only one value per usage of the command.

Because system values are not objects, you cannot save them with the SAVOBJ or SAVLIB command. You can use SAVSYS to save them, but I do not know if you can restore them by themselves, or only if you restore the entire system. That is a strong reason to make a note of any changes you make to system values, so that you can reset them as needed. If nothing else, write the current settings and any changes you make in the Work Management Guide, on the chart of the system values. When you do make a change, note the reason for the change also D particularly with performance values that you may want to reconsider at some later date.

Another way is to print all system values with the WRKSYSVAL command, specifying OUTPUT(*PRINT) every time you change a system value. The best way to document system values is by writing a CL program that contains nothing but CHGSYSVAL commands. Then this program can be executed to "restore" the system values.

As mentioned above, you can retrieve system values within a program. You need to use the CL command RTVSYSVAL (Retrieve System Value). You retrieve the system value that you want into a CL program variable. The variable must be defined as the type of the system value, and must be long enough to accommodate it. For example, do not retrieve QDATE into a 3-digit variable; instead, retrieve it into a character field of length 6 (or 5 if you are using Julian dates).

You can change a system value either interactively or in a CL program. Interactively, you use the WRKSYSVAL or CHGSYSVAL commands; in a CL program, you use CHGSYSVAL. In my experience, I have only seen system value changes for the storage system values, which affect system performance. This is one of the techniques used in automatic tuning programs, although such programs also need to work with other configuration parameters.

Summary

If you are new to the AS/400, or if you have not thought about system values for a while, you may want to review the meaning and settings of the values. New values are added with each release of OS/400, so you ought to stay current with the changes.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: