From 94c2d94032ed04d394b3ab3d6ee4436aefe0ac0f Mon Sep 17 00:00:00 2001 From: agibert Date: Fri, 12 Dec 2008 10:44:19 +0000 Subject: [PATCH] - Fix "-cc" usage print, - Fix Java 1.4 compatibility, - Add 2150 reason code handling in best effort mode. --- MQSSave.java | 18 +++++++++--------- ReleaseNotes.txt | 7 ++++--- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/MQSSave.java b/MQSSave.java index e699c96..ef5fc1e 100644 --- a/MQSSave.java +++ b/MQSSave.java @@ -1,12 +1,12 @@ // $RCSfile: MQSSave.java,v $ -// $Revision: 1.17 $ +// $Revision: 1.18 $ // $Name: $ -// $Date: 2008/12/12 00:08:11 $ +// $Date: 2008/12/12 10:44:19 $ // $Author: agibert $ /* * MQSSave.java - MQ/Series queue to data file saver - * Copyright (C) 2001-2006 Arnaud G. Gibert + * Copyright (C) 2001-2008 Arnaud G. Gibert * mailto:arnaud@rx3.net * http://www.rx3.org/dvp/MQSLoad * @@ -35,9 +35,9 @@ import java.text.*; public class MQSSave { - private String MQSSave_Revision = "$Revision: 1.17 $"; + private String MQSSave_Revision = "$Revision: 1.18 $"; private String MQSSave_Tag = "$Name: $"; - private String MQSSave_Date = "$Date: 2008/12/12 00:08:11 $"; + private String MQSSave_Date = "$Date: 2008/12/12 10:44:19 $"; private String MQSSave_Author = "$Author: agibert $"; private MQQueueManager QMng = null; private String QMng_Name = ""; @@ -46,7 +46,7 @@ public class MQSSave private int MsgQ_Open_Options = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_FAIL_IF_QUIESCING | MQC.MQOO_BROWSE | MQC.MQOO_INQUIRE; private boolean Character_Convert = false; private int Character_Set = 1208; - private Integer Sleep_Time = 0; + private int Sleep_Time = 0; private String Message_Break = "\r\n"; private int Message_Skip = 0; private int Message_Count = 0; @@ -453,13 +453,13 @@ public class MQSSave catch( MQException Expt) { - if( ( Expt.completionCode == 2) && (Expt.reasonCode == 2033)) + if( ( Expt.completionCode == 2) && ( Expt.reasonCode == 2033)) { /* no more messages */ return( null); } - if( Best_Effort_Mode && ( Expt.completionCode == 1) && (Expt.reasonCode == 2110)) + if( Best_Effort_Mode && ( Expt.completionCode == 1) && ( ( Expt.reasonCode == 2110) || ( Expt.reasonCode == 2150))) { /* caracter convertion error */ CC_Error = true; @@ -685,7 +685,7 @@ public class MQSSave private void Usage_Print( ) throws Exception { - System.out.println( "Usage: MQSSave [-qm \"Input_QueueMng_Name\"] [-cc \"character_convert\"] [-cs \"character_set\"] [-st \"sleep_time\"] [-mb \"message_break\"] [-cm] [-tm] [-mbtm] [-bem] [-ms \"message_skip\"] [-mc \"message_count\"] [-rc \"repeat_count\"] "); + System.out.println( "Usage: MQSSave [-qm \"Input_QueueMng_Name\"] [-cc] [-cs \"character_set\"] [-st \"sleep_time\"] [-mb \"message_break\"] [-cm] [-tm] [-mbtm] [-bem] [-ms \"message_skip\"] [-mc \"message_count\"] [-rc \"repeat_count\"] "); System.out.println( " Default: Input QueueMng Name: (" + QMng_Name + ") Character Convert: (" + Character_Convert + ") Character Set: (" + Character_Set + ") Sleep Time: (" + Sleep_Time + ") Message Break: (" + Str_UnFormat( Message_Break) + ") Copy Mode: (" + Copy_Mode + ") Trim Mode: (" + Trim_Mode + ") MsgBreak Trailer Mode: (" + MBTrailer_Mode + ") Best Effort Mode: (" + Best_Effort_Mode + ") Message Skip: (" + Message_Skip + ") Message Count: (" + Message_Count + ") Repeat Count: (" + Repeat_Count + ")"); } diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 3f2c6b4..dd182f9 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,7 +1,7 @@ # $RCSfile: ReleaseNotes.txt,v $ -# $Revision: 1.14 $ +# $Revision: 1.15 $ # $Name: $ -# $Date: 2008/12/12 00:08:11 $ +# $Date: 2008/12/12 10:44:19 $ # $Author: agibert $ @@ -21,7 +21,8 @@ MQSSave V 2.0.0 - A. Gibert - 2008/12/12 - Add character convert option "-cc", - Add character set option "-cs", - Add best effort mode "-bem", -- Add error message count. +- Add error message count, +- Fix Java 1.4 compatibility.