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.
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.
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();
![]()