Author |
Message
|
xddaver |
Posted: Tue Feb 28, 2017 5:56 am Post subject: HTTPINPUT to MQ Output |
|
|
Newbie
Joined: 28 Feb 2017 Posts: 3
|
Hi.
Apologies in advance - I am very new to Broker and have not had training yet.
I am calling the broker from CICS with a COBOL layout. I want to have 3 application layers.
Layer 1 will simply take my HTTPINPUT and output it via MQ Output.
Layer 2 will take in the queue from layer 1 and call layer 3 depending on a request type.
Layer 3 will do an HTTPRequest.
I can send my data in via HTTPInput file. It is written out to the MQ Output with header properties. This means in layer 2 when I read the queue (MQINput) I get a parsing error as I am not expecting the properties.
How do I (a) define the properties in layer 2 or (b) not write out the properties (possibly MQMD) in layer 1.
Please be gentle with me! |
|
Back to top |
|
 |
Vitor |
Posted: Tue Feb 28, 2017 6:23 am Post subject: Re: HTTPINPUT to MQ Output |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
xddaver wrote: |
I am very new to Broker and have not had training yet. |
You're in deep trouble. Thank whoever gave you this task before getting you training and ask exactly how they expect you to succeed.
xddaver wrote: |
I am calling the broker from CICS with a COBOL layout. I want to have 3 application layers. |
Why? What's the point?
xddaver wrote: |
I can send my data in via HTTPInput file. It is written out to the MQ Output with header properties. This means in layer 2 when I read the queue (MQINput) I get a parsing error as I am not expecting the properties. |
You're not expecting the MQ header but the MQInput node is. That shouldn't cause a parsing error. You could mean the HTTP header but as you've not bothered to mention what kind of error it's impossible to say.
xddaver wrote: |
How do I (a) define the properties in layer 2 or (b) not write out the properties (possibly MQMD) in layer 1. |
(a) ensure the headers are properly described in the input (some manual coding required)
(b) you can't remove the MQMD from an MQ message. If you remove it, the MQOutput node will add another. If you actually succeed in writing an MQ message without an MQMD, the MQInput node will be unable to read it. If it's any other kind of header, remove it before serialization.
(c) Don't use this 3 layer strategy
(d) Don't use an HTTPRequest node and call whatever the target system is directly from CICS.
xddaver wrote: |
Please be gentle with me! |
You're welcome. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
xddaver |
Posted: Tue Feb 28, 2017 6:31 am Post subject: |
|
|
Newbie
Joined: 28 Feb 2017 Posts: 3
|
Vitor - thanks for your reply.
Yes I believe I am in deep trouble!
The reason for 3 layers is that we want to get our infrastructure correct for a lot of other functions we will, eventually use the IIB for. It was also suggested to us by IBM to have an input layer, a routing / transformation layer and a processing layer.
You are correct that it is possibly the HTTP Header as it begins "POST http".
The error just stats "DFDL parsing errors have occurred".
Sorry but I have no idea as how to ensure the headers are properly described in the input.
I could use CICS to directly go to the provide but the "direction of travel" the company wishes to go in is to use the Broker.
Thanks again |
|
Back to top |
|
 |
Vitor |
Posted: Tue Feb 28, 2017 6:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
xddaver wrote: |
Yes I believe I am in deep trouble! |
www.monster.com
xddaver wrote: |
The reason for 3 layers is that we want to get our infrastructure correct for a lot of other functions we will, eventually use the IIB for. It was also suggested to us by IBM to have an input layer, a routing / transformation layer and a processing layer. |
Then maybe your company should do some design, while people are being trained.
xddaver wrote: |
You are correct that it is possibly the HTTP Header as it begins "POST http". |
And wouldn't it have been easier if you'd just mentioned that in your original post?
xddaver wrote: |
The error just stats "DFDL parsing errors have occurred". |
I would bet my entire annual bonus (all $10) that there's more error text than that one line.
xddaver wrote: |
Sorry but I have no idea as how to ensure the headers are properly described in the input. |
Your biggest problem (or problems) is that it's a non-trivial task to add the headers in a parsable format to the MQ message and by your own admission you've had no training. It's a fairly simple task to remove the HTTP headers before serializing the MQ message but then of course you lose the ability to reply to the original request from CICS.
Basically, you're in deep trouble. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
xddaver |
Posted: Tue Feb 28, 2017 6:56 am Post subject: |
|
|
Newbie
Joined: 28 Feb 2017 Posts: 3
|
Thanks again.
Yes I should have mentioned it.
I can see no other error message.
I don't want to lose the HTTP Header data as, as you rightly say, I will need it later in the process.
My issue is of how to define it in my second layer to ignore that data so that I can map the fields that I want to pass to the HTTPRequest layer.
Basically I need to know how to resolve the parsing error? Is it just a question of defining the HTTP Header as part of the data on the input queue?
If I am not explaining myself very well I apologise.
Thanks |
|
Back to top |
|
 |
Vitor |
Posted: Tue Feb 28, 2017 8:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
xddaver wrote: |
Is it just a question of defining the HTTP Header as part of the data on the input queue? |
Yes. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|