Start change System values

The system value classes allow a Java program to retrieve and change system values and network attributes.

This includes the ability to display the following:

Using the SystemValue class, a single system value can also be retrieved using the getValue() method and changed using the setValue() method. However, to retrieve a group of system values with the getGroup() method, SystemValueList should be used.

System value list

SystemValueList represents a list of system values on the specified AS/400 system. The list is divided into several groups that allow the Java program to access a portion of the system values at a time.

The following is a list of the groups:

Whenever the value of a system value is retrieved for the first time, the value is retrieved from the AS/400 and cached. On subsequent retrievals, the cached value is returned. If the current AS/400 value is desired instead of the cached value, a clear() must be done to clear the current cache.

Examples of using the SystemValue and SystemValueList classes


The following example shows how to create and retrieve a system value:

//Create an AS400 object AS400 sys = new AS400("mySystem.myCompany.com"); //Create a system value representing the current second on the system. SystemValue sysval = new SystemValue(sys, "QSECOND"); //Retrieve the value. String second = (String)sysval.getValue(); //At this point QSECOND is cached. Clear the cache to retrieve the most //up-to-date value from the system. sysval.clear(); second = (String)sysval.getValue(); //Create a system value list. SystemValueList list = new SystemValueList(sys); //Retrieve all the of the date/time system values. Vector vec = list.getGroup(SystemValueList.GROUP_DATTIM); //Disconnect from the system. sys.disconnectAllServices();End change


[ Legal | AS/400 Glossary ]