|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
tree to string |
« View previous topic :: View next topic » |
Author |
Message
|
chaian |
Posted: Thu Oct 09, 2003 10:23 am Post subject: tree to string |
|
|
Novice
Joined: 30 Sep 2003 Posts: 14 Location: Italy
|
I need to translate this tree:
(0x1000000)REC = (
(0x3000000)trec = 'I'
(0x3000000)codmvs = 'AAAAAAA'
(0x3000000)telaio = '11223344556677889'
(0x3000000)cliente = '00000010'
(0x3000000)fatprz = '0000013445000'
[...]
(0x3000000)przlist = '0000013445000'
(0x3000000)consdat = '20030911'
(0x3000000)marchio = '7'
(0x3000000)allest = ' '
(0x3000000)optional = 'VP=AAAAAAAAAAAAAA VAN=10002456 '
(0x3000000)filler = ' '
Into a string containing all subelements concatenated. This is a repeateble element (with no knowledge un numeber of repeats).
I used BITSTREAM (and ASBITSTREAM) functions. But I was able to build only an Hex string no a CHAR string.
Does anybody help? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 09, 2003 10:41 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If this is a question about WMQI, or WBIMB, then you should ask it usually in the WMQI forum.
But the answer is, you need to specify a CCSID to the ASBITSTREAM function. Then you will get a string of "native" characters, rather than a string of hex values. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
dgolding |
Posted: Thu Oct 09, 2003 10:54 pm Post subject: |
|
|
 Yatiri
Joined: 16 May 2001 Posts: 668 Location: Switzerland
|
Making trees into string? What about global warming  |
|
Back to top |
|
 |
chaian |
Posted: Thu Oct 09, 2003 11:34 pm Post subject: |
|
|
Novice
Joined: 30 Sep 2003 Posts: 14 Location: Italy
|
OK I used this func
SET msgBlob = ASBITSTREAM("InputRoot"."MRM"."REC",
InputRoot.MQMD.Encoding,
InputRoot.MQMD.CodedCharSetId,
'DSROGBO0KC001','L_SDIOF910','CWF',
FolderBitStream);
with:
SET str = CAST(msgBlob AS CHAR CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);
It works fine. But it puts a space character (X'20') at the end of the stream. Anybody knows why?
Moreover, where can I find docs about ASBITSTREAM func?
Thk |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 10, 2003 5:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The docs for the ASBITSTREAM function are in the <WMQI install>/readme.txt after CSD03. _________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|