|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Variable in header MQ by ESQL |
« View previous topic :: View next topic » |
Author |
Message
|
ferquirino |
Posted: Fri May 30, 2014 5:28 am Post subject: Variable in header MQ by ESQL |
|
|
Apprentice
Joined: 05 May 2008 Posts: 34 Location: São Paulo, Brazil
|
Hi,
I don't know if there is another topic, but the searches I didn't find it. Can I place somewhere in the MQ header something business as "purchase amount" through ESQL?
Thanks. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri May 30, 2014 5:31 am Post subject: Re: Variable in header MQ by ESQL |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
ferquirino wrote: |
Hi,
I don't know if there is another topic, but the searches I didn't find it. Can I place somewhere in the MQ header something business as "purchase amount" through ESQL?
Thanks. |
Yes on the RFH2 header in the user (usr?)folder...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
ferquirino |
Posted: Fri May 30, 2014 6:34 am Post subject: Re: Variable in header MQ by ESQL |
|
|
Apprentice
Joined: 05 May 2008 Posts: 34 Location: São Paulo, Brazil
|
fjb_saper wrote: |
Yes on the RFH2 header in the user (usr?)folder...  |
Thanks for you time.
I tried it:
Code: |
SET OutputRoot.MQRFH2.usr.CNPJ = s_CNPJ;
SET OutputRoot.XMLNSC.ns24:AlertaOffLineIntermediario.ns24:AvisoCartaComunicado.ns24:CNPJ = s_CNPJ;
SET OutputRoot.XMLNSC.ns24:AlertaOffLineIntermediario.ns24:AvisoCartaComunicado.ns:NomeEmpresa = s_NomeEmpresa;
SET OutputRoot.XMLNSC.ns24:AlertaOffLineIntermediario.ns24:AvisoCartaComunicado.ns:CPF = s_CPF;
SET OutputRoot.XMLNSC.ns24:AlertaOffLineIntermediario.ns24:AvisoCartaComunicado.ns:Tipo = s_Tipo;
SET OutputRoot.XMLNSC.ns24:AlertaOffLineIntermediario.ns24:AvisoCartaComunicado.ns:DataEnvio = s_DataEnvio; |
And I receveid it in message MQ:
Code: |
RFH l"R ¸$
<usr>
<CNPJ>005701269</CNPJ>
</usr>
<mcd>
<Msd>xmlnsc</Msd>
</mcd>
<NS1:AlertaOffLineIntermediario xmlns:NS1="http://services.experian.com.br/meprotejainter">
<NS1:AvisoCartaComunicado>
<NS1:CNPJ>005701269</NS1:CNPJ>
<NS2:NomeEmpresa xmlns:NS2="http://services.experian.com.br/meproteja">HSBC BANK BRASIL S/A BANCO MULTIPLO</NS2:NomeEmpresa>
<NS3:CPF xmlns:NS3="http://services.experian.com.br/meproteja">36433527949</NS3:CPF>
<NS4:Tipo xmlns:NS4="http://services.experian.com.br/meproteja">Divida</NS4:Tipo>
<NS5:DataEnvio xmlns:NS5="http://services.experian.com.br/meproteja">2013-02-05</NS5:DataEnvio>
</NS1:AvisoCartaComunicado>
</NS1:AlertaOffLineIntermediario> |
What was missing for the value to go to the folder usr header?
Thanks. |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri May 30, 2014 4:56 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Look at the many examples in thie forum of how to create an RFH2 header AND (the important bit), tell WMQ that there is one.
The *.Format fields are the things to look at.
The WMQ headers can be chained together and then the last one points basically says, the thing that comes after me is the message payload. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat May 31, 2014 3:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
smdavies99 wrote: |
Look at the many examples in thie forum of how to create an RFH2 header AND (the important bit), tell WMQ that there is one.
The *.Format fields are the things to look at.
The WMQ headers can be chained together and then the last one points basically says, the thing that comes after me is the message payload. |
Don't forget while chaining the mandatory CCSID values for the RFH2 value pairs.
So when chaining take care of FORMAT, CCSID, ENCODING.
Remember that the encoding field in WMQ describes endian-ness of the data and has nothing to do with character set (unlike xml).
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|