From 51a031b7ae3eec52ee4886f96f021502f259873f Mon Sep 17 00:00:00 2001 From: agibert Date: Tue, 5 Jun 2007 09:27:44 +0000 Subject: [PATCH] Add queue manager name option "-qm". --- MQSSave.java | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/MQSSave.java b/MQSSave.java index c9d9e9d..efc8830 100644 --- a/MQSSave.java +++ b/MQSSave.java @@ -1,14 +1,14 @@ // $RCSfile: MQSSave.java,v $ -// $Revision: 1.11 $ +// $Revision: 1.12 $ // $Name: $ -// $Date: 2003/09/04 15:42:41 $ -// $Author: giberta1 $ +// $Date: 2007/06/05 09:27:44 $ +// $Author: agibert $ /* * MQSSave.java - MQ/Series queue to data file saver - * Copyright (C) 2002 Arnaud G. Gibert - * arnaud.gibert@misys.com - * www.misys.com + * Copyright (C) 2001-2006 Arnaud G. Gibert + * mailto:arnaud@rx3.net + * http://www.rx3.org/dvp/MQSLoad * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -47,10 +47,10 @@ public class MQSSave 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.11 $"; + private String MQSSave_Revision = "$Revision: 1.12 $"; private String MQSSave_Tag = "$Name: $"; - private String MQSSave_Date = "$Date: 2003/09/04 15:42:41 $"; - private String MQSSave_Author = "$Author: giberta1 $"; + private String MQSSave_Date = "$Date: 2007/06/05 09:27:44 $"; + private String MQSSave_Author = "$Author: agibert $"; @@ -206,7 +206,19 @@ public class MQSSave { while( argc < args.length) { - if ( args[argc].equals( "-mb")) + if ( args[argc].equals( "-qm")) + { + if( argc < ( args.length + 1)) + { + QMng_Name = Str_Format( args[++argc]); + } + else + { + System.out.println( "Invalid number of command line options..."); + throw new Exception(); + } + } + else if ( args[argc].equals( "-mb")) { if( argc < ( args.length + 1)) { @@ -782,8 +794,8 @@ public class MQSSave if( ( args.length < 2) || ( args.length > 7)) { - System.out.println( "Usage: MQSSave [-mb \"message_break\"] [-tisbm [-ffn ] | -cm ] [-tm] [-mbtm] "); - System.out.println( " Default: Message Break: (" + Str_UnFormat( Message_Break) + ") TI Swift Batch Mode: (" + TI_Swift_Batch_Mode + ") Copy Mode: (" + Copy_Mode + ") Flush File Name: (" + Flush_File_Name + ") Trim Mode: (" + Trim_Mode + ") MsgBreak Trailer Mode: (" + MBTrailer_Mode + ")"); + System.out.println( "Usage: MQSSave [-qm \"Input_QueueMng_Name\"] [-mb \"message_break\"] [-tisbm [-ffn ] | -cm ] [-tm] [-mbtm] "); + System.out.println( " Default: Input QueueMng Name: (" + QMng_Name + ") Message Break: (" + Str_UnFormat( Message_Break) + ") TI Swift Batch Mode: (" + TI_Swift_Batch_Mode + ") Copy Mode: (" + Copy_Mode + ") Flush File Name: (" + Flush_File_Name + ") Trim Mode: (" + Trim_Mode + ") MsgBreak Trailer Mode: (" + MBTrailer_Mode + ")"); System.exit( 1); } @@ -793,7 +805,7 @@ public class MQSSave Arg_Parse( args); - System.out.println( "Output File Name: (" + Output_File_Name + ") Input MsgQue Name: (" + MsgQ_Name + ") Flush File Name: (" + Flush_File_Name + ")"); + System.out.println( "Output File Name: (" + Output_File_Name + ") Input QueueMng Name: (" + QMng_Name + ") Input MsgQue Name: (" + MsgQ_Name + ") Flush File Name: (" + Flush_File_Name + ")"); System.out.println( "Message Break: (" + Str_UnFormat( Message_Break) + ") TI Swift Batch Mode: (" + TI_Swift_Batch_Mode + ") Copy Mode: (" + Copy_Mode + ") Trim Mode: (" + Trim_Mode + ") MsgBreak Trailer Mode: (" + MBTrailer_Mode + ")"); MQSInit();