w/r/t Sample Java Program z/VM V5R3.0 Systems Management Application Programming SC24-6122-03 http://publib.boulder.ibm.com/infocenter/zvm/v5r3/topic/com.ibm.zvm.v53.dmse6/hcsl8b2050.htm#wq968
This program does not execute correctly due to misreading the Output Parameters.
Here is a diff which corrects it, though the code is slightly reformated (NetBeans auto indentation of both the original and the corrected source). The author or maintainer of the sample will recognize the error in the code from visually
examining the diff: --- SmapiConfigQueryRequest.java.original Mon Aug 4 20:13:16 2008 +++ SmapiConfigQueryRequest.java Mon Aug 4 20:15:29 2008 @@ -151,7 +151,8 @@ int memorySize; byte memoryUnit; byte shareType; - int shareValue; + int lengthOfShareValue; + String shareValue; int numberOfCPUs; List cpuInfo = new ArrayList(); // of CpuInfo objects List deviceInfo = new ArrayList(); // of DeviceInfo objects @@ -174,7 +175,8 @@ memorySize = in.readInt(); memoryUnit = in.readByte(); shareType = in.readByte(); - shareValue = in.readInt(); + lengthOfShareValue = in.readInt(); + shareValue = readString(lengthOfShareValue, in); numberOfCPUs = in.readInt(); int cpuInfoArrayLength = in.readInt(); I've started the PigIron project at http://sourceforge.net/projects/pigiron/ to wrap some tasty Java classes around VSMAPI. -- Jack J. Woehr # "Self-delusion is http://www.well.com/~jax # half the battle!" http://www.softwoehr.com # - Zippy the Pinhead