RTV* command can run only by a clp program.
You'll not be able to execute such a command even via qcmdexec or via
other hll programs.
Usually RTV* commands have at least one parameter that accept a clp
variable as an argument, so the command processind program modifies
pointers. Java provrams cannot use pointers that refer to an address
space but the JVM one.
The Java toolbox provide a lot of classes that cal be used instead of
RTV* commands, e.g to retrieve a sysval you can use
com.ibm.as400.access.SystemValue class:
AS400 system = new AS400 (.....);
SystemValue sysVal = new SystemValue(system, "QSRLNBR");
String serialNumber = sysVal.getValue().toString();
eventually sysval.getValue() will return different types for each
sysval, to test which type you can use sysval.getType() that returns an
integer constant for any possible type, javadoc says:
TYPE_ARRAY - this system value is a String[] object.
TYPE_DATE - this system value is a Date object.
TYPE_DECIMAL - this system value is a BigDecimal object.
TYPE_INTEGER - this system value is an Integer object.
TYPE_STRING - this system value is a String object.