Add queue manager name option "-qm".

This commit is contained in:
agibert 2007-06-05 09:22:43 +00:00
parent 2c55f4ac61
commit d882d2a6a1

View File

@ -1,14 +1,14 @@
// $RCSfile: MQSLoad.java,v $
// $Revision: 1.8 $
// $Revision: 1.9 $
// $Name: $
// $Date: 2002/05/21 15:48:09 $
// $Author: giberta1 $
// $Date: 2007/06/05 09:22:43 $
// $Author: agibert $
/*
* MQSLoad.java - Data file to MQ/Series queue loader
* Copyright (C) 2001-2002 Arnaud G. Gibert
* arnaud.gibert@misys.com
* www.miys-ibs.fr
* 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
@ -45,10 +45,10 @@ public class MQSLoad
private String Message_Break = "\r\n";
private String Message_Tail = "";
private boolean Keep_Message_Break = false;
private String MQSLoad_Revision = "$Revision: 1.8 $";
private String MQSLoad_Revision = "$Revision: 1.9 $";
private String MQSLoad_Tag = "$Name: $";
private String MQSLoad_Date = "$Date: 2002/05/21 15:48:09 $";
private String MQSLoad_Author = "$Author: giberta1 $";
private String MQSLoad_Date = "$Date: 2007/06/05 09:22:43 $";
private String MQSLoad_Author = "$Author: agibert $";
@ -203,7 +203,19 @@ public class MQSLoad
{
while( argc < args.length)
{
if( args[argc].equals( "-fb"))
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( "-fb"))
{
if( argc < ( args.length + 1))
{
@ -540,8 +552,8 @@ public class MQSLoad
if( ( args.length < 2) || ( args.length > 6))
{
System.out.println( "Usage: MQSLoad [-fb \"field_break\"] [-mb \"message_break\"] [-mt \"message_tail\"] [-kmb] <Output_MsgQueue_Name> <Input_File_Name>");
System.out.println( " Default: Field Break: (" + Str_UnFormat( Field_Break) + ") Message Break: (" + Str_UnFormat( Message_Break) + ") Message Tail: (" + Str_UnFormat( Message_Tail) + ") Keep Message Break: (" + Keep_Message_Break + ")");
System.out.println( "Usage: MQSLoad [-qm \"Output_QueueMng_Name\"] [-fb \"field_break\"] [-mb \"message_break\"] [-mt \"message_tail\"] [-kmb] <Output_MsgQueue_Name> <Input_File_Name>");
System.out.println( " Default: Output QueueMng Name: (" + QMng_Name + ") Field Break: (" + Str_UnFormat( Field_Break) + ") Message Break: (" + Str_UnFormat( Message_Break) + ") Message Tail: (" + Str_UnFormat( Message_Tail) + ") Keep Message Break: (" + Keep_Message_Break + ")");
System.exit( 1);
}
@ -551,7 +563,7 @@ public class MQSLoad
Arg_Parse( args);
System.out.println( "Output MsgQueue Name: (" + MsgQ_Name + ") Input File Name: (" + File_Name + ")");
System.out.println( "Output QueueMng Name: (" + QMng_Name + ") Output MsgQueue Name: (" + MsgQ_Name + ") Input File Name: (" + File_Name + ")");
System.out.println( "Field Break: (" + Str_UnFormat( Field_Break) + ") Message Break: (" + Str_UnFormat( Message_Break) + ") Message Tail: (" + Str_UnFormat( Message_Tail) + ") Keep Message Break: (" + Keep_Message_Break + ")");
MQSInit();