Author |
Message
|
JOEL |
Posted: Thu Jan 10, 2002 9:32 am Post subject: |
|
|
Newbie
Joined: 09 Jan 2002 Posts: 5
|
My Root is in BLOB domain.
I have to test a part of the Root.
when i do this :
SET OutputRoot.XML.MSG.GEFWRK.V1 = CAST(SUBSTRING(InputRoot."BLOB"."BLOB" FROM 1 FOR 4) AS CHAR);
or
SET OutputRoot.XML.MSG.GEFWRK.V1 = SUBSTRING(InputRoot."BLOB"."BLOB" FROM 1 FOR 4);
the result is an HEX Chain like X'30303030'
What can i do for obtain a char chain like '0000' ?
Thanks for you help
|
|
Back to top |
|
 |
mpuetz |
Posted: Thu Jan 10, 2002 10:28 am Post subject: |
|
|
Centurion
Joined: 05 Jul 2001 Posts: 149 Location: IBM/Central WebSphere Services
|
Hi,
before WMQI V 2.1 this is hard to achieve.
Basically you have two options, none of them are particularly nice.
1. Roll your own conversion code in ESQL, which is terribly slow.
2a. Store you orig. message in the DestinationList.
b. Write your BLOB string you want to convert into OutputRoot.BLOB.BLOB and append a X'00' at the end.
c. Create a MRM message which contains a single null-terminated string.
d. Use a reset content descriptor to reparse the message with your string-message.
e. Now you have your converted string in the InputBody.
2. is usually faster and easier to implement.
But since 2.1 is out a definitely recommend to upgrade !
Cheers
_________________ Mathias Puetz
IBM/Central WebSphere Services
WebSphere Business Integration Specialist |
|
Back to top |
|
 |
zpat |
Posted: Fri Jan 11, 2002 2:59 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Any upgrade to WMQI 2.1 needs to be planned carefully.
If you look at the readme file for 2.1 you will see quite a few unresolved problems that they knew about. CSD 0 fixes some of these but I would wait for CSD 1 for best results. I think this is due pretty soon. |
|
Back to top |
|
 |
JOEL |
Posted: Mon Jan 14, 2002 3:21 am Post subject: |
|
|
Newbie
Joined: 09 Jan 2002 Posts: 5
|
hi,
Thanks for you translation'idea Mathias.
I use it successfully for a fixed length.
But now I want to have a variable character length.
(to have a generic function)
As you say, i have to use a blob ended by X'00'.
But I don't know how create a MRM wich use it :
So i have an element with 2048 bytes long.
i want to create a compound type wich use it.
In CWF format, physical type i say that i want a NULL terminaison.5for the variable length with X'00' terminated)
When i 'check in' there is an BIP1882E error
I don't understand why.
cheers
|
|
Back to top |
|
 |
Ash |
Posted: Mon Jan 14, 2002 10:42 am Post subject: |
|
|
Novice
Joined: 07 Jan 2002 Posts: 17
|
I am trying to achieve the same thing as Joel i.e. get a variable length null terminated string.
I have created an element of type string with a CWF of null terminated. I then created a Compound type with this element and then added this to a newly created message.
I have not defined any length for the string as I wanted a variable length string.
However, when I try to check in this components I get a BIP1873E complaining about the missing length for the element.
How do I define a variable length null terminated string in MRM.
This is my first attempt to create a MRM message(discounting the one that I did at the MQSI course), so I would appreciate some advice.
Thanks in advance for your help.
Cheers,
Ash.
|
|
Back to top |
|
 |
ravi |
Posted: Mon Jan 14, 2002 12:00 pm Post subject: |
|
|
Novice
Joined: 07 Nov 2001 Posts: 16
|
Hi,
What is the version of Integrator you are using?
MQSI2.0.2 and earlier version cant handle the variable length and delimited strings. You have to rely on Neon Formatter to handle them.
WMQI2.1 has got new format(TDWF) included in MRM parser which can do this job.
ravi. |
|
Back to top |
|
 |
Ash |
Posted: Mon Jan 14, 2002 12:19 pm Post subject: |
|
|
Novice
Joined: 07 Jan 2002 Posts: 17
|
We are using MQSI v2.0.2.
We have got no immediate plans to migrate to WMQ2.1 as we are still struggling with our upgrade to MQSI 2.0.2 and would like to fix this problem at MQSI 2.0.2 level.
What really concerns me now is that various fields like MQMD.Msgid, MQMD.Corellid, and other BLOB fields are being inserted into the database as hex characters with MQSI v2.0.2 whereas they were being implicitly cast as characters and written to the database i MQSI v2.0.1.
This is one of my numerous attempts to insert data into the database as human readable characters instead of hex characters after upgrading to MQSI v2.0.2.
Coming back to this topic, does that mean that I will have to define a string with some maximum length and a null terminated CWF in MRM.
Regards,
Ash.
|
|
Back to top |
|
 |
mpuetz |
Posted: Tue Jan 15, 2002 4:11 pm Post subject: |
|
|
Centurion
Joined: 05 Jul 2001 Posts: 149 Location: IBM/Central WebSphere Services
|
Hi,
STRINGS *must* have a length associated with them. This length represents the maximum internal length for the string. The length element has nothing to do with the CWF-length.
The gui simply uses the associated length element as a default CWF length for fixed length strings in messages.
To solve your problem set the length element to some very large value like 1000000 (which is the value I use, use any value which is
large enough to hold your maximum string), and in the CWF tab set the string to be NULL delimited.
Your message won't be any longer than the actual length of your string + 1.
If you need to get rid of the 0 byte at the end of a message again, convert to the BLOB domain again, and use SUBSTRING to cut the final byte of.
I agree that 2.1 still has some problems
in certain areas and you should definitely
do a regression test on your old flows before
you do a full scale upgrade. But even though
some features do not yet completely work, what works is nice enough for me not to delay
upgrading.
Hope this helps.
_________________
Mathias Puetz
IBM-EMEA AIM Services
MQ/WMQI Specialist
[ This Message was edited by: mpuetz on 2002-01-15 16:14 ] |
|
Back to top |
|
 |
Ash |
Posted: Wed Jan 16, 2002 3:26 am Post subject: |
|
|
Novice
Joined: 07 Jan 2002 Posts: 17
|
Mathias,
I have followed your suggestions and created
a element of type string with a maximum length of 100000 and a CWF of null terminated.
However when I try to check in the components, I get the following error..
BIP1882E: Error creating or updating message repository resource (Compound Type, LOGMSG_CMPTYP): invalid value (NUL) for property (Padding Character) or resource (Element, LOGMSG_ELMT).
An error has been detected when creating or updating a message repository resource. The value of the property, for the resource is not valid. The value, property, and resource in question are indicated by the inserts in the message above.
Change the value and retry the operation.
Joel has mentioned the same error above.
Could one of you please tell me how to resolve this.
Thanks,
Ash
|
|
Back to top |
|
 |
ravi |
Posted: Wed Jan 16, 2002 11:12 am Post subject: |
|
|
Novice
Joined: 07 Nov 2001 Posts: 16
|
Thats just a problem with the control center.
In the Custom wire format tab it takes the earlier value of the 'padding character' even after you changed the physical type to 'null terminated'.
so change the physical type to 'fixed length',delete the value of 'padding character'(which was NULL i suppose) and change the 'physical type' back to 'Null terminated'. then you should be able to check in.
|
|
Back to top |
|
 |
JOEL |
Posted: Fri Jan 25, 2002 1:01 am Post subject: |
|
|
Newbie
Joined: 09 Jan 2002 Posts: 5
|
THANKS A LOT AT ALL OF YOU,
IT'S WALKING WELL !
I VE AN 'UNDER FLOW' FOR MY BLOB TO CHAR CONVERSIONS |
|
Back to top |
|
 |
|