- Add character convert option "-cc"
This commit is contained in:
parent
ee82f99ecc
commit
0496074951
23
MQSLoad.java
23
MQSLoad.java
@ -1,7 +1,7 @@
|
||||
// $RCSfile: MQSLoad.java,v $
|
||||
// $Revision: 1.17 $
|
||||
// $Revision: 1.18 $
|
||||
// $Name: $
|
||||
// $Date: 2008/12/11 14:17:18 $
|
||||
// $Date: 2008/12/12 00:00:31 $
|
||||
// $Author: agibert $
|
||||
|
||||
/*
|
||||
@ -35,15 +35,16 @@ import com.ibm.mq.*;
|
||||
|
||||
public class MQSLoad
|
||||
{
|
||||
private String MQSLoad_Revision = "$Revision: 1.17 $";
|
||||
private String MQSLoad_Revision = "$Revision: 1.18 $";
|
||||
private String MQSLoad_Tag = "$Name: $";
|
||||
private String MQSLoad_Date = "$Date: 2008/12/11 14:17:18 $";
|
||||
private String MQSLoad_Date = "$Date: 2008/12/12 00:00:31 $";
|
||||
private String MQSLoad_Author = "$Author: agibert $";
|
||||
private MQQueueManager QMng = null;
|
||||
private String QMng_Name = "";
|
||||
private MQQueue MsgQ;
|
||||
private String MsgQ_Name;
|
||||
private int MsgQ_Open_Options = MQC.MQOO_OUTPUT | MQC.MQOO_FAIL_IF_QUIESCING;
|
||||
private boolean Character_Convert = false;
|
||||
private int Character_Set = 1208;
|
||||
private int Sleep_Time = 0;
|
||||
private String Field_Break = "";
|
||||
@ -223,6 +224,10 @@ public class MQSLoad
|
||||
throw new Exception();
|
||||
}
|
||||
}
|
||||
else if ( args[argc].equals( "-cc"))
|
||||
{
|
||||
Character_Convert = true;
|
||||
}
|
||||
else if ( args[argc].equals( "-cs"))
|
||||
{
|
||||
if( argc < ( args.length + 1))
|
||||
@ -645,8 +650,12 @@ public class MQSLoad
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
if( Character_Convert)
|
||||
{
|
||||
output_msg.format = MQC.MQFMT_STRING;
|
||||
}
|
||||
|
||||
output_msg.characterSet = Character_Set;
|
||||
|
||||
work_win_size = 1024 * 64;
|
||||
@ -774,8 +783,8 @@ public class MQSLoad
|
||||
|
||||
private void Usage_Print( ) throws Exception
|
||||
{
|
||||
System.out.println( "Usage: MQSLoad [-qm \"Output_QueueMng_Name\"] [-cs \"character_set\"] [-st \"sleep_time\"] [-fb \"field_break\"] [-mb \"message_break\"] [-mt \"message_tail\"] [-kmb] [-ms \"message_skip\"] [-mc \"message_count\"] [-rc \"repeat_count\"] <Output_MsgQueue_Name> <Input_File_Name>");
|
||||
System.out.println( " Default: Output QueueMng Name: (" + QMng_Name + ") Character Set: (" + Character_Set + ") Sleep Time: (" + Sleep_Time + ") Field Break: (" + Str_UnFormat( Field_Break) + ") Message Break: (" + Str_UnFormat( Message_Break) + ") Message Tail: (" + Str_UnFormat( Message_Tail) + ") Keep Message Break: (" + Keep_Message_Break + ") Message Skip: (" + Message_Skip + ") Message Count: (" + Message_Count + ") Repeat Count: (" + Repeat_Count + ")");
|
||||
System.out.println( "Usage: MQSLoad [-qm \"Output_QueueMng_Name\"] [-cc \"character_convert\"] [-cs \"character_set\"] [-st \"sleep_time\"] [-fb \"field_break\"] [-mb \"message_break\"] [-mt \"message_tail\"] [-kmb] [-ms \"message_skip\"] [-mc \"message_count\"] [-rc \"repeat_count\"] <Output_MsgQueue_Name> <Input_File_Name>");
|
||||
System.out.println( " Default: Output QueueMng Name: (" + QMng_Name + ") Character Convert: (" + Character_Convert + ") Character Set: (" + Character_Set + ") Sleep Time: (" + Sleep_Time + ") Field Break: (" + Str_UnFormat( Field_Break) + ") Message Break: (" + Str_UnFormat( Message_Break) + ") Message Tail: (" + Str_UnFormat( Message_Tail) + ") Keep Message Break: (" + Keep_Message_Break + ") Message Skip: (" + Message_Skip + ") Message Count: (" + Message_Count + ") Repeat Count: (" + Repeat_Count + ")");
|
||||
}
|
||||
|
||||
|
||||
@ -789,7 +798,7 @@ public class MQSLoad
|
||||
private void Args_Print( ) throws Exception
|
||||
{
|
||||
System.out.println( "Output QueueMng Name: (" + QMng_Name + ") Output MsgQueue Name: (" + MsgQ_Name + ") Input File Name: (" + File_Name + ")");
|
||||
System.out.println( "Character Set: (" + Character_Set + ") Sleep Time: (" + Sleep_Time + ") Field Break: (" + Str_UnFormat( Field_Break) + ") Message Break: (" + Str_UnFormat( Message_Break) + ") Message Tail: (" + Str_UnFormat( Message_Tail) + ") Keep Message Break: (" + Keep_Message_Break + ") Message Skip: (" + Message_Skip + ") Message Count: (" + Message_Count + ") Repeat Count: (" + Repeat_Count + ")");
|
||||
System.out.println( "Character Convert: (" + Character_Convert + ") Character Set: (" + Character_Set + ") Sleep Time: (" + Sleep_Time + ") Field Break: (" + Str_UnFormat( Field_Break) + ") Message Break: (" + Str_UnFormat( Message_Break) + ") Message Tail: (" + Str_UnFormat( Message_Tail) + ") Keep Message Break: (" + Keep_Message_Break + ") Message Skip: (" + Message_Skip + ") Message Count: (" + Message_Count + ") Repeat Count: (" + Repeat_Count + ")");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# $RCSfile: ReleaseNotes.txt,v $
|
||||
# $Revision: 1.13 $
|
||||
# $Revision: 1.14 $
|
||||
# $Name: $
|
||||
# $Date: 2008/12/11 14:17:18 $
|
||||
# $Date: 2008/12/12 00:00:31 $
|
||||
# $Author: agibert $
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ MQSLoad V 2.0.0 - A. Gibert - 2008/12/11
|
||||
- Add message count option "-mc",
|
||||
- Add repeat count option "-rc",
|
||||
- Add character set option "-cs",
|
||||
- Add character convert option "-cc",
|
||||
- Fix Java 1.4 compatibility.
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user