|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Changing the data in an RFH field |
« View previous topic :: View next topic » |
Author |
Message
|
DaveyD |
Posted: Mon Dec 17, 2001 8:35 am Post subject: |
|
|
Novice
Joined: 11 Dec 2001 Posts: 12
|
Hi,
Iam trying to change the data in a field in a MQRFH2 header.
I am using the following code
SET OutputRoot.MQRFH2 = InputRoot.MQRFH2
SET OutputRoot.MQRHF2.Field = 'Hello'
However, in the output message I get (Field dt="Hello"/)
when I want (Field dt="string")Hello(/Field)
Any suggestions ?
By the way had to replace the chevrons with brackets in this post to display msgs
[ This Message was edited by: DaveyD on 2001-12-17 08:38 ] |
|
Back to top |
|
 |
mpuetz |
Posted: Wed Dec 19, 2001 7:36 am Post subject: |
|
|
Centurion
Joined: 05 Jul 2001 Posts: 149 Location: IBM/Central WebSphere Services
|
Hi,
the capabilities of the MQRFH2 parser
are limited. Could you please describe
your problem in a bit more detail, I'm
not quite sure I understand what you are
trying to do.
Some background:
MQRFH2 has fix length section and variable
length XML section. Fixed length header fields should accessed by e.g.
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR';
Variable Length XML can *only* by string elements.
You are recommended to put all user defined
data elements into the section
OutputRoot.MQRH2.usr.xxx
To generate the following XML Syntax
data
use
SET OutputRoot.MQRFH2.usr.field = 'data';
SET OutputRoot.MQRFH2.usr.field.(XML.attr)type = 'String';
NOTE:
You can insert non-char data into the name-value section of MQRFH2, but you will get
a parser exception when you try write the message to queue.
See also, page 62 in the 2.0.2 ESQL Ref. Book
_________________ Mathias Puetz
IBM/Central WebSphere Services
WebSphere Business Integration Specialist |
|
Back to top |
|
 |
mpuetz |
Posted: Wed Dec 19, 2001 7:40 am Post subject: |
|
|
Centurion
Joined: 05 Jul 2001 Posts: 149 Location: IBM/Central WebSphere Services
|
Hi again,
let's try again to the XML right
<usr>
<Field type='String'>data</Field>
</usr>
by disabling HTML in the post
_________________ Mathias Puetz
IBM/Central WebSphere Services
WebSphere Business Integration Specialist |
|
Back to top |
|
 |
DaveyD |
Posted: Wed Dec 19, 2001 8:06 am Post subject: |
|
|
Novice
Joined: 11 Dec 2001 Posts: 12
|
Cheers.
I got this to work by deletin the field first.
ie.
SET OutputRoot.MQRFH2.usr.field = NULL
Then I did
Set OutputRoot.MQRFH2.usr.(XML.tag)Field.(XML.attr)dt = 'String';
Set OutputRoot.MQRFH2.usr.(XML.tag)Field = 'xxxxxx';
Not sure if this is the best way to do it, but it works. |
|
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
|
|
|
|