Skip to content

Commit

Permalink
use version to improve sizing
Browse files Browse the repository at this point in the history
Signed-off-by: John Marshall <jmarshall@connectria.com>
  • Loading branch information
JMConnect authored and ThePrez committed Jan 3, 2025
1 parent 349ad8f commit f0033f3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/java/com/ibm/as400/access/list/AspOpenList.java
Original file line number Diff line number Diff line change
Expand Up @@ -634,11 +634,18 @@ protected Object[] formatOutputData(byte[] data, int recordsReturned, int record
**/
protected int getBestGuessReceiverSize(int number)
{
int vrm = 0;
try {
vrm = system_.getVRM();
} catch (AS400SecurityException | IOException e) {
// assume older version
}

switch (format_)
{
case 1: return 64 * number;
case 2: return 148 * number;
case 3: return 94 * number;
case 2: return (vrm >= 0x00070400 ? 154 : 148) * number;
case 3: return (vrm >= 0x00070500 ? 124 : 94) * number;
case 4: return 13 * number;
case 5: return 46 * number;
case 6: return 52 * number;
Expand Down

0 comments on commit f0033f3

Please sign in to comment.