Author |
Message
|
DeadManWalks |
Posted: Thu Feb 24, 2011 9:46 am Post subject: MQPUT and multiple records in one message |
|
|
Newbie
Joined: 24 Feb 2011 Posts: 4
|
Hello. I am running MQ on the ISeries and have the MQPUT working. We are doing AMS with US Customs. Their requirement is to send the multiple records in one message. They could not provide me an example of what that looked like. So I tried to send the data with a <CR> after each 80 character record , but this did not work. Any thoughts on what they might be getting at and how to handle?
Eric. |
|
Back to top |
|
 |
fatherjack |
Posted: Thu Feb 24, 2011 9:56 am Post subject: Re: MQPUT and multiple records in one message |
|
|
 Knight
Joined: 14 Apr 2010 Posts: 522 Location: Craggy Island
|
DeadManWalks wrote: |
Hello. I am running MQ on the ISeries and have the MQPUT working. We are doing AMS with US Customs. Their requirement is to send the multiple records in one message. They could not provide me an example of what that looked like. So I tried to send the data with a <CR> after each 80 character record , but this did not work. Any thoughts on what they might be getting at and how to handle?
Eric. |
Lots of thoughts. Some may be close, some may be well wide of the mark, one might actually be spot on. But they would all just be guesses. If you are going to get this to work you need to know exactly what the messages need to look like. And the only ones who can tell you this are US Customs. _________________ Never let the facts get in the way of a good theory. |
|
Back to top |
|
 |
DeadManWalks |
Posted: Thu Feb 24, 2011 10:10 am Post subject: |
|
|
Newbie
Joined: 24 Feb 2011 Posts: 4
|
I understand the message. It is any number of 80 character in length records. What I can not figure out is how to have multiple records of 80 characters in one message.
I had previous send a string of the recs concatenated together. (this is how I receive there data, and then parse it out). They got nothing.
When I sent 1 record per message, they only saw the first and last. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 24, 2011 10:23 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
DeadManWalks wrote: |
I had previous send a string of the recs concatenated together. (this is how I receive there data, and then parse it out). They got nothing. |
You need them to tell you exactly what they're receiving their end. And how they interpret it.
DeadManWalks wrote: |
When I sent 1 record per message, they only saw the first and last. |
Maybe you've got <CR> characters between the records and shouldn't. Maybe you should have some other delimiter. Maybe they send you 1-n 80 character card images but expect 1-n 133 print images. It's impossible to say from here.
A WMQ message is just a string of bytes. How it's assembled at one end and interpreted at the other is a matter for the 2 parties involved.
Try talking to these people. Or better still, get a requirements document from them. If your assertion:
DeadManWalks wrote: |
Their requirement is to send the multiple records in one message. They could not provide me an example of what that looked like. |
is correct then you're doomed. Because if they don't know what their input looks like, how can they know they want multiple records? How many do they want? You can fit a lot of 80 (or 133) byte records in a 100Mb WMQ message - how many can their receiving application take? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Feb 24, 2011 10:27 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
First thing to do is send your messages to a local queue that is not on the other end.
Then you can confirm that you know what your program is producing, and what the messages look like.
Then you can get them to tell you what the messages SHOULD look like, and change your program to produce that.
THEN you can try sending those messages to them, and find out if it's working. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Feb 24, 2011 11:32 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
DeadManWalks wrote: |
I understand the message. It is any number of 80 character in length records. What I can not figure out is how to have multiple records of 80 characters in one message.
I had previous send a string of the recs concatenated together. (this is how I receive there data, and then parse it out). They got nothing.
When I sent 1 record per message, they only saw the first and last. |
No, you don't understand the message format as required by US Customs. They must and will provide you with an exact layout, including (logical) record separator characters. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
fatherjack |
Posted: Thu Feb 24, 2011 12:32 pm Post subject: |
|
|
 Knight
Joined: 14 Apr 2010 Posts: 522 Location: Craggy Island
|
DeadManWalks wrote: |
I understand the message. |
So what's your problem then. If you know what the message needs to look like, then construct it to look like that. Job's a good'n. _________________ Never let the facts get in the way of a good theory. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Feb 24, 2011 1:41 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
I've worked with clients that dealt with Fed agencies, and the documentation from the Fed was painfully explicit as to the form and content of the application payload, MQMD fields (persistence, expiry, etc.), and channel and queue names. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
DeadManWalks |
Posted: Mon Feb 28, 2011 7:46 am Post subject: |
|
|
Newbie
Joined: 24 Feb 2011 Posts: 4
|
They have not told me what record separators to use. Only that each message has multiple records of 80 character in length. I am working with non techies. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 28, 2011 7:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
DeadManWalks wrote: |
They have not told me what record separators to use. |
Then they can't complain when you use the wrong ones.
DeadManWalks wrote: |
I am working with non techies. |
Then they need to find some techies.
Seriously, you can't guess what format they need. Either they provide it or they point you to a published format. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Mon Feb 28, 2011 8:13 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Typically on i-Series you would use fixed length layouts, without CR or CRLF (also in EBCDIC these may not be quite the same character).
If you are creating messages in EBCDIC make sure they are convertable to ASCII. Set the codepage (MQMD.CCSID) to match the data (MQPUT does not convert data). You might have to produce data in ASCII or set CONVERT(YES) on the channel to force conversion.
The problem with including more than one record per message is that gives you an upper limit on the number of records that can be sent. What happens if you exceed this? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 28, 2011 8:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
The problem with including more than one record per message is that gives you an upper limit on the number of records that can be sent. What happens if you exceed this? |
Exactly the question I asked earlier
You can't guess what a receiving application wants. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Feb 28, 2011 8:32 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
DeadManWalks wrote:
They have not told me what record separators to use. |
Then you cannot possibly hope to satisfy their requirements, can you?
Push this back to your management, and then to US Customs. The Fed agency I worked with gave me a 20-page. 2-sided document with explicit requirements for message size, content and format. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
DeadManWalks |
Posted: Thu Mar 03, 2011 7:57 am Post subject: |
|
|
Newbie
Joined: 24 Feb 2011 Posts: 4
|
Sadness continues.
Here is what the data looks like when I put it in the sending Queue;
Code: |
ACRT
CAWCUSTOMTI
M01X
XXA10JPSNP TEST
- TCAW BL
17100020000001
P011
10102201100020
J01X
XXA
T01D
RFEB1719 TPHU4
653966HS0B213025
201-00923
ZCRT
CAW TI
00
004
|
so I have 80 character records one after another. But they show me that the data gets wrapped;
Code: |
000001 ACRTCAWCUSTOMTI
000002 M01XXXA10JPSNP TEST - TCAW BL17100020000001
000003 P01110102201100020
000004 J01XXXA
000005 T01DRFEB1719 TPHU4653966HS0B213025201-
000006 00923 ZCRTCAW TI
000007 00004
****** **************************** Bottom of Data ****************************
|
Any thoughts on what I can change in MQ or is this wrapping on there side. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Mar 03, 2011 8:36 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
But they show me that the data gets wrapped; |
They are wrapped because you are using a viewer that wraps the data when viewed.
What utility did you use to view and post the message data? (the top of your post)
I'm not sure why you posted the message data. We don't know what is required by the agency that wants the data.
[edit]
Requirements for message and record layouts need to be supplied by the agency that wants the messages/records. You can't guess at this.
[/edit] _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
|