From bf636a2cea96fa7fe1ba4471cdcc1cec1dcaa1ca Mon Sep 17 00:00:00 2001 From: giberta1 Date: Thu, 14 Nov 2002 13:40:24 +0000 Subject: [PATCH] Add -mbtm switch, Implement message break trailer mode. --- MQSSave.java | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/MQSSave.java b/MQSSave.java index a5763cd..55a5b58 100644 --- a/MQSSave.java +++ b/MQSSave.java @@ -1,7 +1,7 @@ // $RCSfile: MQSSave.java,v $ -// $Revision: 1.9 $ +// $Revision: 1.10 $ // $Name: $ -// $Date: 2002/07/29 09:56:18 $ +// $Date: 2002/11/14 13:40:24 $ // $Author: giberta1 $ /* @@ -44,10 +44,11 @@ public class MQSSave private String Message_Break = "\r\n"; private boolean TI_Swift_Batch_Mode = false; private boolean Trim_Mode = false; + private boolean MBTrailer_Mode = false; private int Total_Nb = 0, Moved_Nb = 0, Skiped_Nb = 0, Scaned_Nb = 0, Flushed_Nb = 0; - private String MQSSave_Revision = "$Revision: 1.9 $"; + private String MQSSave_Revision = "$Revision: 1.10 $"; private String MQSSave_Tag = "$Name: $"; - private String MQSSave_Date = "$Date: 2002/07/29 09:56:18 $"; + private String MQSSave_Date = "$Date: 2002/11/14 13:40:24 $"; private String MQSSave_Author = "$Author: giberta1 $"; @@ -236,6 +237,10 @@ public class MQSSave { Trim_Mode = true; } + else if ( args[argc].equals( "-mbtm")) + { + MBTrailer_Mode = true; + } else { Output_File_Name = args[argc++]; @@ -715,6 +720,11 @@ public class MQSSave } while( input_msg != null); + if( MBTrailer_Mode) + { + Output_File.write( Message_Break.getBytes()); + } + System.out.println( "\n"); } @@ -747,8 +757,8 @@ public class MQSSave if( ( args.length < 2) || ( args.length > 7)) { - System.out.println( "Usage: MQSSave [-mb \"message_break\"] [-tisbm [-ffn ]] [-tm] "); - System.out.println( " Default: Message Break: (" + Str_UnFormat( Message_Break) + ") TI Swift Batch Mode: (" + TI_Swift_Batch_Mode + ") Trim Mode: (" + Trim_Mode + ") Flush File Name: (" + Flush_File_Name + ")"); + System.out.println( "Usage: MQSSave [-mb \"message_break\"] [-tisbm [-ffn ]] [-tm] [-mbtm] "); + System.out.println( " Default: Message Break: (" + Str_UnFormat( Message_Break) + ") TI Swift Batch Mode: (" + TI_Swift_Batch_Mode + ") Trim Mode: (" + Trim_Mode + ") MsgBreak Trailer Mode: (" + MBTrailer_Mode + ") Flush File Name: (" + Flush_File_Name + ")"); System.exit( 1); }