ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Variable in header MQ by ESQL

Post new topic  Reply to topic
 Variable in header MQ by ESQL « View previous topic :: View next topic » 
Author Message
ferquirino
PostPosted: Fri May 30, 2014 5:28 am    Post subject: Variable in header MQ by ESQL Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri May 30, 2014 5:31 am    Post subject: Re: Variable in header MQ by ESQL Reply with quote

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
View user's profile Send private message Send e-mail
ferquirino
PostPosted: Fri May 30, 2014 6:34 am    Post subject: Re: Variable in header MQ by ESQL Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Fri May 30, 2014 4:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Sat May 31, 2014 3:05 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Variable in header MQ by ESQL
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.