Compare commits
39 Commits
mqsload-1_
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
bf1d811041 | ||
|
b7fcd00035 | ||
|
44a23a3a7f | ||
|
d6b7c66a7b | ||
|
5c1c862d5e | ||
|
c939079819 | ||
|
87802fb8c3 | ||
|
d1b66d0c6f | ||
|
0496074951 | ||
|
ee82f99ecc | ||
|
ffb13ee948 | ||
|
542f5b9bd6 | ||
|
bc2254cab8 | ||
|
f12bcae985 | ||
|
67b4a7aa8b | ||
|
99d17a844e | ||
|
ded4a3926f | ||
|
d882d2a6a1 | ||
|
2c55f4ac61 | ||
|
d327c3e4e9 | ||
|
15b8cece80 | ||
|
20cc7fc471 | ||
|
402f904383 | ||
|
f3b64d8cc5 | ||
|
c03202827e | ||
|
5bd41e53ef | ||
|
0ffc88e129 | ||
|
7187b8e088 | ||
|
79e9c52f34 | ||
|
982b8533a1 | ||
|
895119edc8 | ||
|
a886c59026 | ||
|
eafca20611 | ||
|
d02756a1f2 | ||
|
ff4e50d58c | ||
|
9c43a21b50 | ||
|
10646d1aed | ||
|
44bde69fd5 | ||
|
fa0a1f8f73 |
1244
MQSLoad.java
1244
MQSLoad.java
File diff suppressed because it is too large
Load Diff
102
ReadMe.txt
102
ReadMe.txt
@ -1,5 +1,101 @@
|
|||||||
# $RCSfile: ReadMe.txt,v $
|
# $RCSfile: ReadMe.txt,v $
|
||||||
# $Revision: 1.1 $
|
# $Revision: 1.11 $
|
||||||
# $Name: $
|
# $Name: $
|
||||||
# $Date: 2001/07/09 15:51:18 $
|
# $Date: 2009/01/05 17:45:40 $
|
||||||
# $Author: giberta1 $
|
# $Author: agibert $
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Compilation:
|
||||||
|
------------
|
||||||
|
|
||||||
|
- Just type: "javac MQSLoad.java" !
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Installation:
|
||||||
|
-------------
|
||||||
|
|
||||||
|
- You only need the MQSLoad.class file.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
------
|
||||||
|
|
||||||
|
MQSLoad [-qm "Output_QueueMng_Name"] [-cc] [-cs "character_set"] [-mp "message_priority"] [-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>
|
||||||
|
|
||||||
|
Default: Output QueueMng Name: () Character Convert: (false) Character Set: (1208) Message Priority: (-1) Sleep Time: (0) Field Break: () Message Break: (\r\n) Message Tail: () Keep Message Break: (false) Message Skip: (0) Message Count: (0) Repeat Count: (1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
----------
|
||||||
|
|
||||||
|
- Optional arguments:
|
||||||
|
-qm "Output_QueueMng_Name": Name of the queue manager to use,
|
||||||
|
-cc "character_convert": Switch on the caracter conversion (Set the MQMessage format to MQC.MQFMT_STRING),
|
||||||
|
-cs "character_set": MQMessage character set,
|
||||||
|
-mp "message_priority": Priority of the message,
|
||||||
|
-st "sleep_time": Delay between message sending,
|
||||||
|
-fb "field_break": String used as field separator,
|
||||||
|
-mb "message_break": String used as message separator,
|
||||||
|
-mt "message_tail": String added at the message end,
|
||||||
|
-kmb "keep_message_break": Keep the message break (inserted at the message end, next to the message tail),
|
||||||
|
-ms "message_skip": Number of messages to skip before to start the loading,
|
||||||
|
-mc "message_count": Number of messages to load,
|
||||||
|
-rc "repeat_count": Number of time the whole process (start of file + skip + load) should be repeated.
|
||||||
|
|
||||||
|
- Mandatory arguments:
|
||||||
|
<Output_MsgQueue_Name>: Name of the output message queue to load to,
|
||||||
|
<Input_File_Name>: Name of the input file to load from.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
------
|
||||||
|
|
||||||
|
- MQSLoad has been tested with WMQ 6.0
|
||||||
|
|
||||||
|
- "-fb" and "-mb" arguments accept a string with formated escape character:
|
||||||
|
+ "\n" for newline,
|
||||||
|
+ "\r" for return,
|
||||||
|
+ "\t" for tabulation,
|
||||||
|
+ "\\" for \.
|
||||||
|
|
||||||
|
- Message breaks are used for message separation in the batch file,
|
||||||
|
- Message breaks are striped from the sended message if "-kmb" (keep message break) is not set,
|
||||||
|
- Message tail specified after "-mt" option is inserted between message and message break,
|
||||||
|
- Field breaks are striped from the sended message.
|
||||||
|
|
||||||
|
- Windows text files: newline is specified as "\r\n",
|
||||||
|
- Unix text files: newline is specified as "\n".
|
||||||
|
|
||||||
|
- By default:
|
||||||
|
+ There is no field break,
|
||||||
|
+ Message break is "\r\n",
|
||||||
|
+ Message breaks are striped.
|
||||||
|
|
||||||
|
- This software is under the GNU General Public License. See GNU-GPL.txt.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Usage Examples:
|
||||||
|
---------------
|
||||||
|
|
||||||
|
- To load a swift batch file "swift-batch.txt" with "---MESSAGE-BREAK---" message separator into the MQ/Series "SWIFT-QUEUE" use:
|
||||||
|
java MQSLoad -mb "---MESSAGE-BREAK---\r\n" SWIFT-QUEUE swift-batch.txt
|
||||||
|
|
||||||
|
- To load 10 time the third message of the file "swift-batch.txt" with "---MESSAGE-BREAK---" as message separator into the MQ/Series "SWIFT-QUEUE" use:
|
||||||
|
java MQSLoad -mb "---MESSAGE-BREAK---\r\n" -ms 2 -mc 1 -rc 10 SWIFT-QUEUE swift-batch.txt
|
||||||
|
|
||||||
|
- To load a raw swift batch file "swift-batch-raw.txt" with "}\r\n" message break into the MQ/Series "SWIFT-QUEUE" and by keeping message break separator use:
|
||||||
|
java MQSLoad -mb "}\r\n" -kmb SWIFT-QUEUE swift-batch-raw.txt
|
||||||
|
|
||||||
|
- To load a raw swift batch file "swift-batch-raw.txt" with "}\r\n" message break into the MQ/Series "SWIFT-QUEUE" and by keeping only "}" as end of message use:
|
||||||
|
java MQSLoad -mb "}\r\n" -mt "}" SWIFT-QUEUE swift-batch-raw.txt
|
||||||
|
|
||||||
|
- To load a csv batch file "batch.csv" with ";" field separator into the MQ/Series "DATA-QUEUE" use:
|
||||||
|
java MQSLoad -fb ";" DATA-QUEUE csv-batch.csv
|
||||||
|
109
ReleaseNotes.txt
109
ReleaseNotes.txt
@ -1,5 +1,108 @@
|
|||||||
# $RCSfile: ReleaseNotes.txt,v $
|
# $RCSfile: ReleaseNotes.txt,v $
|
||||||
# $Revision: 1.1 $
|
# $Revision: 1.16 $
|
||||||
# $Name: $
|
# $Name: $
|
||||||
# $Date: 2001/07/09 15:51:18 $
|
# $Date: 2009/01/05 17:43:32 $
|
||||||
# $Author: giberta1 $
|
# $Author: agibert $
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
MQSLoad V 2.0.0 - A. Gibert - 2008/01/05
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Major code rewrite and cleanup,
|
||||||
|
- Add message skip option "-ms",
|
||||||
|
- Add message count option "-mc",
|
||||||
|
- Add repeat count option "-rc",
|
||||||
|
- Add character set option "-cs",
|
||||||
|
- Add character convert option "-cc",
|
||||||
|
- Add message priority option "-mp",
|
||||||
|
- Fix Java 1.4 compatibility.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
MQSLoad V 1.3.2 - A. Gibert - 2008/11/14
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- WARNING: Fix a big bug in Load_File() method: all previous MQSLoad versions
|
||||||
|
can corrupt messages during loading !!!
|
||||||
|
- Fix elapsed time computation !
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
MQSLoad V 1.3.1 - A. Gibert - 2008/01/03
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Fix usage print out.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
MQSLoad V 1.3.0 - C. Colin / A. Gibert - 2007/12/10
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Add sleep time option "-st".
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
MQSLoad V 1.2.0 - A. Gibert - 2007/06/05
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Add queue manager name option "-qm".
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
MQSLoad V 1.1.4 - A. Gibert - 2002/05/21
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Add message tail option "-mt",
|
||||||
|
Add MQQueueManager() auto retry,
|
||||||
|
Add version, date and author print out.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
MQSLoad V 1.1.2 - A. Gibert - 2002/05/06
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Add return code handling.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
MQSLoad V 1.1.1 - A. Gibert - 2002/05/02
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Add Keep Message Break support,
|
||||||
|
Add -kmb option.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
MQSLoad V 1.1.0 - A. Gibert - 2002/04/23
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Add string field break and string message break support,
|
||||||
|
Add customisable field break and message break support,
|
||||||
|
Add command line switches "-fb" and "-mb",
|
||||||
|
Add statistics reporting,
|
||||||
|
Add nicer message sending progress indicator,
|
||||||
|
Complete rewrite of the sending engine,
|
||||||
|
Remove some debug print-out,
|
||||||
|
Add GPL and FDL licenses files.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
MQSLoad V 1.0.0 - A. Gibert - 2001/07/12
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
First release,
|
||||||
|
Field break hardcoded to ";",
|
||||||
|
Message break hardcoded to "\r\n".
|
||||||
|
14
ToDo.txt
14
ToDo.txt
@ -1,5 +1,13 @@
|
|||||||
# $RCSfile: ToDo.txt,v $
|
# $RCSfile: ToDo.txt,v $
|
||||||
# $Revision: 1.1 $
|
# $Revision: 1.3 $
|
||||||
# $Name: $
|
# $Name: $
|
||||||
# $Date: 2001/07/09 15:51:17 $
|
# $Date: 2008/12/12 10:47:06 $
|
||||||
# $Author: giberta1 $
|
# $Author: agibert $
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- Add stdin pipe support,
|
||||||
|
- Write a better documentation !
|
||||||
|
- ...
|
||||||
|
5411
test-swift-batch-big1.txt
Normal file
5411
test-swift-batch-big1.txt
Normal file
File diff suppressed because it is too large
Load Diff
49
test-swift-batch-big2.txt
Normal file
49
test-swift-batch-big2.txt
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
SWIFTOUT
|
||||||
|
{1:F01BCMAMAMCAXXX0857229951}{2:O1001511000801CICPFRPPAXXX65003436280008011611N}{4:
|
||||||
|
:20:CIC0001
|
||||||
|
:32A:000918EUR25062,66
|
||||||
|
:50:SOCIETE S.A.
|
||||||
|
PARIS
|
||||||
|
FRANCE
|
||||||
|
:57A:BCMAMAMCXXX
|
||||||
|
:59:I.A.M.
|
||||||
|
FES
|
||||||
|
MAROC
|
||||||
|
:70:/RFB/SOC01901
|
||||||
|
:71A:BEN
|
||||||
|
-}{5:{MAC:BCED2F18}{CHK:075B64FB4533}}
|
||||||
|
---MESSAGE-BREAK---
|
||||||
|
SWIFTOUT
|
||||||
|
{1:F01BCMAMAMC1XXX0000000000}{2:I730BNPAFRPPXXXXN}{4:
|
||||||
|
:20:ELC00001007
|
||||||
|
:21:TESTS-DL-003
|
||||||
|
:30:010629
|
||||||
|
-}
|
||||||
|
---MESSAGE-BREAK---
|
||||||
|
SWIFTOUT
|
||||||
|
{1:F01BCMAMAMC1XXX0000000000}{2:I710BCPCMACCXXXXN}{4:
|
||||||
|
:27:1/1
|
||||||
|
:40B:IRREVOCABLE TRANSFERABLE
|
||||||
|
ADDING OUR CONFIRMATION
|
||||||
|
:20:ELC00001002
|
||||||
|
:21:POB00001001
|
||||||
|
:31C:010328
|
||||||
|
:31D:010528PARIS
|
||||||
|
:52A:BARCGB22XXX
|
||||||
|
:50:SOCIETE ABC
|
||||||
|
AVENUE DES ALPES
|
||||||
|
CASABLANCA
|
||||||
|
:59:HUSUM PLASTIC
|
||||||
|
:32B:MAD100000,00
|
||||||
|
:41A:BARCGB22XXX
|
||||||
|
BY PAYMENT
|
||||||
|
:43P:NOT ALLOWED
|
||||||
|
:43T:NOT ALLOWED
|
||||||
|
:44A:GERMANY
|
||||||
|
:44B:CASABLANCA
|
||||||
|
:71B:ALL FOREIGN BANK CHARGES ARE FOR
|
||||||
|
THE ACCOUNT OF THE BENEFICIARY
|
||||||
|
:49:WITHOUT
|
||||||
|
-}
|
||||||
|
---MESSAGE-BREAK---
|
||||||
|
SWIFTEND
|
80
test-swift-batch.txt
Normal file
80
test-swift-batch.txt
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
SWIFTBEGIN
|
||||||
|
---MESSAGE-BREAK---
|
||||||
|
SWIFTOUT
|
||||||
|
{1:F01BCMAMAMCAXXX0857229951}{2:O1001511000801CICPFRPPAXXX65003436280008011611N}{4:
|
||||||
|
:20:CIC0001
|
||||||
|
:32A:000918EUR25062,66
|
||||||
|
:50:SOCIETE S.A.
|
||||||
|
PARIS
|
||||||
|
FRANCE
|
||||||
|
---MESSAGE-BREAK---
|
||||||
|
SWIFTBEGIN
|
||||||
|
---MESSAGE-BREAK---
|
||||||
|
SWIFTOUT
|
||||||
|
{1:F01BCMAMAMCAXXX0857229951}{2:O1001511000801CICPFRPPAXXX65003436280008011611N}{4:
|
||||||
|
:20:CIC0001
|
||||||
|
:32A:000918EUR25062,66
|
||||||
|
:50:SOCIETE S.A.
|
||||||
|
PARIS
|
||||||
|
FRANCE
|
||||||
|
:57A:BCMAMAMCXXX
|
||||||
|
:59:I.A.M.
|
||||||
|
FES
|
||||||
|
MAROC
|
||||||
|
:70:/RFB/SOC01901
|
||||||
|
:71A:BEN
|
||||||
|
-}{5:{MAC:BCED2F18}{CHK:075B64FB4533}}
|
||||||
|
---MESSAGE-BREAK---
|
||||||
|
SWIFTABORT
|
||||||
|
---MESSAGE-BREAK---
|
||||||
|
SWIFTBEGIN
|
||||||
|
---MESSAGE-BREAK---
|
||||||
|
SWIFTOUT
|
||||||
|
{1:F01BCMAMAMCAXXX0857229951}{2:O1001511000801CICPFRPPAXXX65003436280008011611N}{4:
|
||||||
|
:20:CIC0001
|
||||||
|
:32A:000918EUR25062,66
|
||||||
|
:50:SOCIETE S.A.
|
||||||
|
PARIS
|
||||||
|
FRANCE
|
||||||
|
:57A:BCMAMAMCXXX
|
||||||
|
:59:I.A.M.
|
||||||
|
FES
|
||||||
|
MAROC
|
||||||
|
:70:/RFB/SOC01901
|
||||||
|
:71A:BEN
|
||||||
|
-}{5:{MAC:BCED2F18}{CHK:075B64FB4533}}
|
||||||
|
---MESSAGE-BREAK---
|
||||||
|
SWIFTOUT
|
||||||
|
{1:F01BCMAMAMC1XXX0000000000}{2:I730BNPAFRPPXXXXN}{4:
|
||||||
|
:20:ELC00001007
|
||||||
|
:21:TESTS-DL-003
|
||||||
|
:30:010629
|
||||||
|
-}
|
||||||
|
---MESSAGE-BREAK---
|
||||||
|
SWIFTOUT
|
||||||
|
{1:F01BCMAMAMC1XXX0000000000}{2:I710BCPCMACCXXXXN}{4:
|
||||||
|
:27:1/1
|
||||||
|
:40B:IRREVOCABLE TRANSFERABLE
|
||||||
|
ADDING OUR CONFIRMATION
|
||||||
|
:20:ELC00001002
|
||||||
|
:21:POB00001001
|
||||||
|
:31C:010328
|
||||||
|
:31D:010528PARIS
|
||||||
|
:52A:BARCGB22XXX
|
||||||
|
:50:SOCIETE ABC
|
||||||
|
AVENUE DES ALPES
|
||||||
|
CASABLANCA
|
||||||
|
:59:HUSUM PLASTIC
|
||||||
|
:32B:MAD100000,00
|
||||||
|
:41A:BARCGB22XXX
|
||||||
|
BY PAYMENT
|
||||||
|
:43P:NOT ALLOWED
|
||||||
|
:43T:NOT ALLOWED
|
||||||
|
:44A:GERMANY
|
||||||
|
:44B:CASABLANCA
|
||||||
|
:71B:ALL FOREIGN BANK CHARGES ARE FOR
|
||||||
|
THE ACCOUNT OF THE BENEFICIARY
|
||||||
|
:49:WITHOUT
|
||||||
|
-}
|
||||||
|
---MESSAGE-BREAK---
|
||||||
|
SWIFTEND
|
4200
test-swift-raw-big.txt
Normal file
4200
test-swift-raw-big.txt
Normal file
File diff suppressed because it is too large
Load Diff
42
test-swift-raw.txt
Normal file
42
test-swift-raw.txt
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{1:F01BCMAMAMCAXXX0857229951}{2:O1001511000801CICPFRPPAXXX65003436280008011611N}{4:
|
||||||
|
:20:CIC0001
|
||||||
|
:32A:000918EUR25062,66
|
||||||
|
:50:SOCIETE S.A.
|
||||||
|
PARIS
|
||||||
|
FRANCE
|
||||||
|
:57A:BCMAMAMCXXX
|
||||||
|
:59:I.A.M.
|
||||||
|
FES
|
||||||
|
MAROC
|
||||||
|
:70:/RFB/SOC01901
|
||||||
|
:71A:BEN
|
||||||
|
-}{5:{MAC:BCED2F18}{CHK:075B64FB4533}}
|
||||||
|
{1:F01BCMAMAMC1XXX0000000000}{2:I730BNPAFRPPXXXXN}{4:
|
||||||
|
:20:ELC00001007
|
||||||
|
:21:TESTS-DL-003
|
||||||
|
:30:010629
|
||||||
|
-}
|
||||||
|
{1:F01BCMAMAMC1XXX0000000000}{2:I710BCPCMACCXXXXN}{4:
|
||||||
|
:27:1/1
|
||||||
|
:40B:IRREVOCABLE TRANSFERABLE
|
||||||
|
ADDING OUR CONFIRMATION
|
||||||
|
:20:ELC00001002
|
||||||
|
:21:POB00001001
|
||||||
|
:31C:010328
|
||||||
|
:31D:010528PARIS
|
||||||
|
:52A:BARCGB22XXX
|
||||||
|
:50:SOCIETE ABC
|
||||||
|
AVENUE DES ALPES
|
||||||
|
CASABLANCA
|
||||||
|
:59:HUSUM PLASTIC
|
||||||
|
:32B:MAD100000,00
|
||||||
|
:41A:BARCGB22XXX
|
||||||
|
BY PAYMENT
|
||||||
|
:43P:NOT ALLOWED
|
||||||
|
:43T:NOT ALLOWED
|
||||||
|
:44A:GERMANY
|
||||||
|
:44B:CASABLANCA
|
||||||
|
:71B:ALL FOREIGN BANK CHARGES ARE FOR
|
||||||
|
THE ACCOUNT OF THE BENEFICIARY
|
||||||
|
:49:WITHOUT
|
||||||
|
-}
|
Loading…
Reference in New Issue
Block a user