Compare commits

..

10 Commits

Author SHA1 Message Date
agibert
e461670367 - Add MQV7 support (Thanks to Yves MOYROUD !) 2013-11-08 17:17:12 +00:00
agibert
89c00936c2 Fix release date. 2009-01-05 17:41:42 +00:00
agibert
2d3d359d79 Document new options and add an example. 2009-01-05 17:40:17 +00:00
agibert
5904264927 Fix MQMessage character set handling,
Fix character set error handling.
2009-01-05 17:32:49 +00:00
agibert
c4d5a98daa Initial release. 2009-01-05 17:29:19 +00:00
agibert
f45cc9b0b1 - Fix usage print out. 2008-12-18 17:25:42 +00:00
agibert
94c2d94032 - Fix "-cc" usage print,
- Fix Java 1.4 compatibility,
- Add 2150 reason code handling in best effort mode.
2008-12-12 10:44:19 +00:00
agibert
0c88d68c22 - Add character convert option "-cc",
- Add best effort mode "-bem",
- Add error message count.
2008-12-12 00:08:11 +00:00
agibert
d53cbc6c99 - Major code rewrite and cleanup,
- Add binary data support,
- drop obsolete TI swift batch mode support,
- Add message skip option "-ms",
- Add message count option "-mc",
- Add repeat count option "-rc",
- Add character set option "-cs".
2008-12-11 13:52:05 +00:00
agibert
6c20aac629 Fix elapsed time computation ! 2008-11-10 01:52:00 +00:00
6 changed files with 817 additions and 833 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
# $RCSfile: ReadMe.txt,v $ # $RCSfile: ReadMe.txt,v $
# $Revision: 1.5 $ # $Revision: 1.6 $
# $Name: $ # $Name: $
# $Date: 2007/12/11 16:50:50 $ # $Date: 2009/01/05 17:40:17 $
# $Author: agibert $ # $Author: agibert $
@ -10,6 +10,7 @@
Compilation: Compilation:
------------ ------------
- Just type: "javac MQSSave.java" ! - Just type: "javac MQSSave.java" !
@ -21,10 +22,42 @@ Installation:
Usage:
------
MQSSave [-qm "Input_QueueMng_Name"] [-cc] [-cs "character_set"] [-st "sleep_time"] [-mb "message_break"] [-cm] [-tm] [-mbtm] [-bem] [-ms "message_skip"] [-mc "message_count"] [-rc "repeat_count"] <Output_File_Name> <Input_MsgQueue_Name>
Default: Input QueueMng Name: () Character Convert: (false) Character Set: (1208) Sleep Time: (0) Message Break: (\r\n) Copy Mode: (false) Trim Mode: (false) MsgBreak Trailer Mode: (false) Best Effort Mode: (false) Message Skip: (0) Message Count: (0) Repeat Count: (1)
Arguments:
----------
- Optional arguments:
-qm "Input_QueueMng_Name": Name of the queue manager to use,
-cc "character_convert": Switch on the caracter conversion (Set the MQGetMessageOptions to MQC.MQGMO_CONVERT),
-cs "character_set": MQMessage character set,
-st "sleep_time": Delay between message sending,
-mb "message_break": String used as message separator,
-cm "copy_mode": Don't remove messages from queue,
-tm "trim_mode": Remove trailing spaces at the message end,
-mbtm "msg_break_trailer_mode": Add a message break at the end of the last message,
-bem "best effort mode": Skip errors and continue to save the next message,
-ms "message_skip": Number of message to skip before to start the saving,
-mc "message_count": Number of message to save,
-rc "repeat_count": Number of time the whole process (start of file + skip + save) should be repeated.
- Mandatory arguments:
<Output_File_Name>: Name of the output file to save to,
<Input_MsgQueue_Name>: Name of the input message queue to save from.
Notes: Notes:
------ ------
- MQSSave has been tested with MQ/Series 5.2, 5.2, 5.3 and WMQ 6.0. - MQSSave has been tested with WMQ 6.0.
- "-mb" argument accept a string with formated escape character: - "-mb" argument accept a string with formated escape character:
+ "\n" for newline, + "\n" for newline,
@ -37,12 +70,9 @@ Notes:
- Windows text files: newline is specified as "\r\n", - Windows text files: newline is specified as "\r\n",
- Unix text files: newline is specified as "\n". - Unix text files: newline is specified as "\n".
- The Flush File is only used when TI Swift Batch Mode is enabled (by setting "-tisbm" command line switch).
- When trim mode is enabled (by setting "-tm" command line switch), all the trailing spaces are removed. - When trim mode is enabled (by setting "-tm" command line switch), all the trailing spaces are removed.
- By default Message break is "\r\n", - By default Message break is "\r\n",
- By default Flush File Name is "flush.txt".
- This software is under the GNU General Public License. See GNU-GPL.txt. - This software is under the GNU General Public License. See GNU-GPL.txt.
@ -54,5 +84,5 @@ Usage Example:
- To save the messages of the MQ/Series "SWIFT-QUEUE" queue into a swift batch file "swift-batch.txt" with "---MESSAGE-BREAK---" message separator use: - To save the messages of the MQ/Series "SWIFT-QUEUE" queue into a swift batch file "swift-batch.txt" with "---MESSAGE-BREAK---" message separator use:
java MQSSave -mb "---MESSAGE-BREAK---\r\n" swift-batch.txt SWIFT-QUEUE java MQSSave -mb "---MESSAGE-BREAK---\r\n" swift-batch.txt SWIFT-QUEUE
- To save the messages of the MQ/Series "SWIFT-QUEUE" queue into a swift batch file "swift-batch.txt" with no message break message and by using the TI Swift Batch Mode, use: - To save 10 times the third message of the MQ/Series "SWIFT-QUEUE" queue into a swift batch file "swift-batch.txt" with "---MESSAGE-BREAK---" message separator without removing it from the queue use:
java MQSSave -mb "" -tisbm swift-batch.txt SWIFT-QUEUE java MQSSave -mb "---MESSAGE-BREAK---\r\n" -cm -ms 2 -mc 1 -rc 10 swift-batch.txt SWIFT-QUEUE

View File

@ -1,13 +1,39 @@
# $RCSfile: ReleaseNotes.txt,v $ # $RCSfile: ReleaseNotes.txt,v $
# $Revision: 1.11 $ # $Revision: 1.16 $
# $Name: $ # $Name: $
# $Date: 2008/01/03 13:46:01 $ # $Date: 2009/01/05 17:41:42 $
# $Author: agibert $ # $Author: agibert $
--------------------------------------------------------------------------------
MQSSave V 2.0.0 - A. Gibert - 2009/01/05
--------------------------------------------------------------------------------
- Major code rewrite and cleanup,
- Add binary data support,
- Drop obsolete TI swift batch mode support,
- Add message skip option "-ms",
- Add message count option "-mc",
- Add repeat count option "-rc",
- Add character convert option "-cc",
- Add character set option "-cs",
- Add best effort mode "-bem",
- Add error message count,
- Fix Java 1.4 compatibility.
--------------------------------------------------------------------------------
MQSSave V 1.3.2 - A. Gibert - 2008/11/10
--------------------------------------------------------------------------------
Fix elapsed time computation !
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
MQSSave V 1.3.1 - A. Gibert - 2008/01/03 MQSSave V 1.3.1 - A. Gibert - 2008/01/03
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

1
test-charset-in-iso Normal file
View File

@ -0,0 +1 @@
ISO [И]

1
test-charset-in-utf Normal file
View File

@ -0,0 +1 @@
UTF8 [é]

49
test-charset.sh Executable file
View File

@ -0,0 +1,49 @@
#!/bin/bash
function file_load
{
out="$1"
in="$2"
cc="$3"
cs="$4"
echo -n "CC: [$cc] CS: [$cs] $(cat $in)" >$$.tmp
mqsload -mb '\n---\n' $cc -cs $cs $out $$.tmp
\rm $$.tmp
}
function file_save
{
out="$1"
in="$2"
cc="$3"
cs="$4"
cm="$5"
mqssave -mb '\n---\n' $cc -cs $cs $cm -bem $out $in
}
file_load DLQ test-charset-in-utf "-cc" 1208
file_load DLQ test-charset-in-utf "-cc" 819
file_load DLQ test-charset-in-iso "-cc" 1208
file_load DLQ test-charset-in-iso "-cc" 819
file_load DLQ test-charset-in-utf " " 1208
file_load DLQ test-charset-in-utf " " 819
file_load DLQ test-charset-in-iso " " 1208
file_load DLQ test-charset-in-iso " " 819
\rm test-charset-out-cc-utf test-charset-out-cc-iso test-charset-out-__-utf test-charset-out-__-iso
file_save test-charset-out-cc-utf DLQ "-cc" 1208 "-cm"
file_save test-charset-out-cc-iso DLQ "-cc" 819 "-cm"
file_save test-charset-out-__-utf DLQ " " 1208 "-cm"
file_save test-charset-out-__-iso DLQ " " 819 " "