mInputParams.length());
mInputParams.append(XStringSupport.getNumberString(callNumber - 1,
mCountLength));
}
parameters[0] = new ProgramParameter(mConverter
.stringToByteArray(mInputParams.toString()));
/*
* Filling the output parameters
*/
if (callNumber == 1)
{
NodeList output = doc.getElementsByTagName(TAG_OUTPUT);
if (output.getLength() != 1)
{
throw new XException(Constants.LOCATION_EXTERN,
Constants.LAYER_TECHNICAL,
Constants.PACKAGE_TECHNICAL_AS400, "47");
}
mOutputFields = getFields(output.item(0).getChildNodes());
}
if ((CALLTYPE_MULTI.equals(callType)) && callNumber == 1)
{
Configuration config = Configuration.getInstance();
mCountLength = config.getValueAsInt("AS400Program", function,
"CounterLength");
parameters[1] = new ProgramParameter(mCountLength);
}
else
{
if (callNumber < 3)
{
Field field = null;
for (Iterator it = mOutputFields.iterator(); it.hasNext();)
{
field = (Field) it.next();
mOutputLength = mOutputLength + field.length;
}
}
parameters[1] = new ProgramParameter(mOutputLength);
}
return parameters;
}