From f0033f3d10abfd9aa7c36039ecca76ac1e1a6df4 Mon Sep 17 00:00:00 2001 From: John Marshall Date: Wed, 1 May 2024 10:56:18 -0500 Subject: [PATCH] use version to improve sizing Signed-off-by: John Marshall --- .../java/com/ibm/as400/access/list/AspOpenList.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ibm/as400/access/list/AspOpenList.java b/src/main/java/com/ibm/as400/access/list/AspOpenList.java index bdd238b0c..d4737c2a5 100644 --- a/src/main/java/com/ibm/as400/access/list/AspOpenList.java +++ b/src/main/java/com/ibm/as400/access/list/AspOpenList.java @@ -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;