Fix MQMessage character set handling,

Fix character set error handling.
This commit is contained in:
agibert 2009-01-05 17:32:49 +00:00
parent c4d5a98daa
commit 5904264927

View File

@ -1,7 +1,7 @@
// $RCSfile: MQSSave.java,v $ // $RCSfile: MQSSave.java,v $
// $Revision: 1.19 $ // $Revision: 1.20 $
// $Name: $ // $Name: $
// $Date: 2008/12/18 17:25:42 $ // $Date: 2009/01/05 17:32:49 $
// $Author: agibert $ // $Author: agibert $
/* /*
@ -35,9 +35,9 @@ import java.text.*;
public class MQSSave public class MQSSave
{ {
private String MQSSave_Revision = "$Revision: 1.19 $"; private String MQSSave_Revision = "$Revision: 1.20 $";
private String MQSSave_Tag = "$Name: $"; private String MQSSave_Tag = "$Name: $";
private String MQSSave_Date = "$Date: 2008/12/18 17:25:42 $"; private String MQSSave_Date = "$Date: 2009/01/05 17:32:49 $";
private String MQSSave_Author = "$Author: agibert $"; private String MQSSave_Author = "$Author: agibert $";
private MQQueueManager QMng = null; private MQQueueManager QMng = null;
private String QMng_Name = ""; private String QMng_Name = "";
@ -594,8 +594,6 @@ public class MQSSave
{ {
if( CC_Error) if( CC_Error)
{ {
CC_Error = false;
Counter_Print( "*"); Counter_Print( "*");
Msg_Error_Nb++; Msg_Error_Nb++;
@ -628,12 +626,17 @@ public class MQSSave
try try
{ {
// input_msg.format = MQC.MQFMT_STRING; // input_msg.format = MQC.MQFMT_STRING;
input_msg.characterSet = Character_Set;
/* Loop while Msg_Count not reatch */ /* Loop while Msg_Count not reatch */
while( Msg_Get( input_msg, msg_id, Msg_Skip, Msg_Count, get_first)) while( Msg_Get( input_msg, msg_id, Msg_Skip, Msg_Count, get_first))
{ {
get_first = false; get_first = false;
if( CC_Error == false)
{
/* This message is not in error */
if( msg_id >= Msg_Skip) if( msg_id >= Msg_Skip)
{ {
/* This message is not skiped */ /* This message is not skiped */
@ -659,6 +662,14 @@ public class MQSSave
MQSDelete_Msg( input_msg); MQSDelete_Msg( input_msg);
} }
} }
}
else
{
/* This message is in error */
CC_Error = false;
}
msg_id++; msg_id++;
} }