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 IndexWebSphere Message Broker (ACE) Supportunable to read the ascill values with packed decimal embeded

Post new topicReply to topic
unable to read the ascill values with packed decimal embeded View previous topic :: View next topic
Author Message
HiLee
PostPosted: Fri Dec 10, 2010 11:03 am Post subject: unable to read the ascill values with packed decimal embeded Reply with quote

Newbie

Joined: 10 Dec 2010
Posts: 7

I get a message file in ASCII which will have some packed decimals embeded in it

In put file looks like this

Code:
 Ú òñððððô÷øõ@@@@@@@@@@÷÷÷@â@™–
„@â£@Á¢¢–ƒ÷÷÷@â@™–„@â£@@@@@@׈‰“„…“
—ˆ‰@@@@@@@@ððóðñ`òóð÷ð@@@@@@@@@@@@@ÄÄèðððòÕÅ
ÂÉðöðôñððððñðöðõñðòôððÄãððððððKÔåñ@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@
 Ú
òñððððô÷øõ@@@@@@@@@@òñððððô÷øõ@@@@ÙãññÁ@Èóðøôùõóöø
@@ðöðôñððððñðöðõñðòôððððððððððððÕðñðñðñÕÕÅððððððñôóòððððððñ
ôôõðððððððððððððñððððððððððð÷òðððððððððððððððñòððððððæðððððñø
÷óñðò@@@ÒæÈ@@@@ÒæðñððÁó`ÔäÇ@@ðöðõñðöÄððÙð×
 Úéòñððððô÷øõ@@@@@@@@@@ ¡ › œ ™ œ ²  ’   Œ ¦ Ã Ì Ð Õ É Å Å
Î Ï Í Ñ Î Ò Ó Ô Ý ä Ú Ù Ö Õ Ø á ñ å Û Õ Ø Ï Ñ Æ ¼ µ ¹ ¶ ´ ´ ° ¯ © ¦ ª ¦
¨ ¦ § ¡ ® ± À ¼ Â º Î Ì Ù Ò Ù Ò Ò Ö Ü ß Ø Û Û Ø Ü Õ æ á ó Ù Ê Æ Ê Ç Ã
Á » ³ ® ® «
 Ú
òñððððô÷øõ@@@@@@@@@@òñððððô÷øõ@@@@ÙãññÁ@Èóðøôùõóöø
@@ðöðôñððððñðöðõñðòôððððððððððððÕðòðòðøÕÕÅððððððñðòòððððððñð
óóðððððððððððððñððððððððððð÷òðððððððððððððððñòððððððæðððððñõð
óñðò@@@ÒØÈ@@ÒåÁÙðñððÁó`ÔäÇ@@ðöðõñðöÄððÙð×
 Úéòñððððô÷øõ@@@@@@@@@@ ƒ ~  ~ |  u p p p m …   ¤ © ª ¢ ¢  
© ¨ © « ¦ © « ª ± ¶ ¯ ¯ ¬ ¯ ® ² ½ ¶ ° ¬ « ¦ ¦ œ ˜ ” — – • • ‘ ’ Œ ‡ ‹
‰ Š Š  ‰  “ Ÿ œ  – ¤ £ ª ¨ ­ ¨ § « ¯ ¯ ¬ ­ ° ® ² ® · µ ¾ ª  › š š • “ ‘ ‹
‰ ‹ ˆ
 Ú 
òñððððõòõò@@@@@@@@@@×ÅÃÖ@ÅÕÅÙÇè@ÃÖ@@@@@@øóð@âÃ
ÈäèÓÒÉÓÓ@Áå@@@×ÈÉÓÁÄÅÓ×ÈÉÁ@@@@@@@@ñõøñô`ðñôðõ@@@
@@@@@@@@@@ÄÄèðððòÕÅÂÉðöðôñððððñðöðõñðòôððÄãððððððKÔåñ
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 Ú
òñððððõòõò@@@@@@@@@@òñððððõòõò@@@@ÙãðòÁ@Èôññóùùòôø
@ðöðôñððððñðöðõñðòôððððððððððððÕðñðñðñÕÕÅððððððððøóððððððððø
÷ðððððððððððððñððððððððððð÷òðððððððððððððððñòððððððæððððððôôö
óðò@@@ÒæÈ@@@@ÒæðñððÁó`ÔäÇ@@ðöðõñðöÄððÙð×
 Úéòñððððõòõò@@@@@@@@@@ ) * , + * + + * , ) 1 ; : > @ B C @
B B B A > > = ; 9 9 8 6 7 5 4 3 2 1 0 1 1 2 . . . / * ( * * ( ( ( * ) ' ( ) (
$ ' $ $ ' ' ( ( ' ' & ( * ) ) * * * + + ) ' * * + , - , ) ) * + ) + + * + ) )
 Ú
òñððððõòõò@@@@@@@@@@òñððððõòõò@@@@ÙãðòÁ@Èôññóùùòôø
@@ðöðôñððððñðöðõñðòôððððððððððððÕðòðòðøÕÕÅðððððððñðùðððððððñ
ñóðððððððððððððñððððððððððð÷òðððððððððððððððñòððððððæððððððõø
ñõðò@@@ÒØÈ@@ÒåÁÙðñððÁó`ÔäÇ@@ðöðõñðöÄððÙð×
 Úéòñððððõòõò@@@@@@@@@@ 8 7 9 : 9 9 9 9 9 9 = C B E G G H F
F I I I G G F E C B C B A B B A A @ ? @ ? ? > > > ? < 7 : 8 6 6 8 8 7 5
7 7 5 5 6 4 4 8 8 8 : : 8 8 : ; : ; < ; : ; < : 9 ; < = > > > < : ; ; 9 : 8
9 9 8 8
 Ú


=========================
when I tried following code

[code]DECLARE MessageBlob BLOB ASBITSTREAM(InputBody,

COALESCE(InputRoot.MQMD.Encoding,InputProperties.Encoding,0),

COALESCE(InputRoot.MQMD.CodedCharSetId,InputProperties.CodedCharSetId,0),

,,,EmbeddedBitStream);


DECLARE MessageChar CHARACTER '';


SET OutputRoot.MQMD.CodedCharSetId = 500;

SET OutputRoot.MQMD.Encoding = 785;

SET OutputRoot.MQMD.Format = 'MQIMS ';


SET MessageChar = CAST (MessageBlob AS BLOB CCSID OutputRoot.MQMD.CodedCharSetId);

SET OutputRoot.XMLNSC.reading = MessageChar;[/quote]



the output i get is

[code]X'00da0001f2f1f0f0f0f0f4f7f8f540404040404040404040f7f7f740
e240c29996818440e2a340c1a2a29683f7f7f740e240c29996818440e2a3
404040404040d788899381848593978889814040404040404040f0f0f3f
0f160f2f3f0f7f040404040404040404040404040c4c4e8f0f0f0f2d5c5c2c9
f0f6f0f4f1f0f0f0f0f1f0f6f0f5f1f0f2f4f0f0c4e3f0f0f0f0f0f04bd4e5f1404040
404040404040404040404040404040404040404040404040404040404
040404040404040404040404040404040404040404040404040404040
40404040400d0a00da000af2f1f0f0f0f0f4f7f8f540404040404040404040
f2f1f0f0f0f0f4f7f8f540404040d9e3f1f1c140c8f3f0f8f4f9f5f3f6f84040f0f6
f0f4f1f0f0f0f0f1f0f6f0f5f1f0f2f4f0f0f0f0f0f0f0f0f0f0f0f0d5f0f1f0f1f0f1d5
d5c5f0f0f0f0f0f0f1f4f3f2f0f0f0f0f0f0f1f4f4f5f0f0f0f0f0f0f0f0f0f0f0f0f0f1f
0f0f0f0f0f0f0f0f0f0f0f7f2f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f1f2f0f0f0f0f0f0e6
f0f0f0f0f0f1f8f7f3f1f0f2404040d2e6c840404040d2e6f0f1f0f0c1f360d4e
4c74040f0f6f0f5f1f0f6c4f0f0d9f0d70d0a00da03e9f2f1f0f0f0f0f4f7f8f540
40404040404040404000a1009b009c0099009c00b2009d0092008f008d
008c00a600c300cc00d000d500c900c500c500ce00cf00cd00d100ce00d2
00d300d400dd00e400da00d900d600d500d800e100f100e500db00d500
d800cf00d100c600bc00b500b900b600b400b400b000af00a900a600aa0
0a600a800a600a700a100ae00b100c000bc00c200ba00ce00cc00d900d2
00d900d200d200d600dc00df00d800db00db00d800dc00d500e600e100
f300d900ca00c600ca00c700c300c100bb00b300ae00ae00ab0d0a00da0
00af2f1f0f0f0f0f4f7f8f540404040404040404040f2f1f0f0f0f0f4f7f8f5404
04040d9e3f1f1c140c8f3f0f8f4f9f5f3f6f84040f0f6f0f4f1f0f0f0f0f1f0f6f0f5
f1f0f2f4f0f0f0f0f0f0f0f0f0f0f0f0d5f0f2f0f2f0f8d5d5c5f0f0f0f0f0f0f1f0f2f2
f0f0f0f0f0f0f1f0f3f3f0f0f0f0f0f0f0f0f0f0f0f0f0f1f0f0f0f0f0f0f0f0f0f0f0f7f2
f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f1f2f0f0f0f0f0f0e6f0f0f0f0f0f1f5f0f3f1f0f24
04040d2d8c84040d2e5c1d9f0f1f0f0c1f360d4e4c74040f0f6f0f5f1f0f6c4f
0f0d9f0d70d0a00da03e9f2f1f0f0f0f0f4f7f8f54040404040404040404000
83007e0081007e007c00810075007000700070006d008500a000a400a9
00aa00a200a200a000a900a800a900ab00a600a900ab00aa00b100b600
af00af00ac00af00ae00b200bd00b600b000ac00ab00a600a6009c009800
94009700960095009500910092008c0087008b0089008a008a008d008
900900093009f009c009d009600a400a300aa00a800ad00a800a700ab0
0af00af00ac00ad00b000ae00b200ae00b700b500be00aa009d009b009a
009a009500930091008b0089008b00880d0a00da0001f2f1f0f0f0f0f5f2f
5f240404040404040404040d7c5c3d640c5d5c5d9c7e840c3d640404040
4040f8f3f040e2c3c8e4e8d3d2c9d3d340c1e5404040d7c8c9d3c1c4c5d3
d7c8c9c14040404040404040f1f5f8f1f460f0f1f4f0f54040404040404040
4040404040c4c4e8f0f0f0f2d5c5c2c9f0f6f0f4f1f0f0f0f0f1f0f6f0f5f1f0f2f4
f0f0c4e3f0f0f0f0f0f04bd4e5f1404040404040404040404040404040404
040404040404040404040404040404040404040404040404040404040
40404040404040404040404040404040404040400d0a00da000af2f1f0f
0f0f0f5f2f5f240404040404040404040f2f1f0f0f0f0f5f2f5f240404040d9e
3f0f2c140c8f4f1f1f3f9f9f2f4f84040f0f6f0f4f1f0f0f0f0f1f0f6f0f5f1f0f2f4f0
f0f0f0f0f0f0f0f0f0f0f0d5f0f1f0f1f0f1d5d5c5f0f0f0f0f0f0f0f0f8f3f0f0f0f0f0
f0f0f0f8f7f0f0f0f0f0f0f0f0f0f0f0f0f0f1f0f0f0f0f0f0f0f0f0f0f0f7f2f0f0f0f0f0
f0f0f0f0f0f0f0f0f0f0f1f2f0f0f0f0f0f0e6f0f0f0f0f0f0f4f4f6f3f0f2404040d2e
6c840404040d2e6f0f1f0f0c1f360d4e4c74040f0f6f0f5f1f0f6c4f0f0d9f0d7
0d0a00da03e9f2f1f0f0f0f0f5f2f5f2404040404040404040400029002a00
2c002b002a002b002b002a002c00290031003b003a003e004000420043
00400042004200420041003e003e003d003b003900390038003600370
03500340033003200310030003100310032002e002e002e002f002a002
8002a002a002800280028002a00290027002800290028002400270024
002400270027002800280027002700260028002a00290029002a002a0
02a002b002b00290027002a002a002b002c002d002c00290029002a002
b0029002b002b002a002b002900290d0a00da000af2f1f0f0f0f0f5f2f5f24
0404040404040404040f2f1f0f0f0f0f5f2f5f240404040d9e3f0f2c140c8f4f
1f1f3f9f9f2f4f84040f0f6f0f4f1f0f0f0f0f1f0f6f0f5f1f0f2f4f0f0f0f0f0f0f0f0f
0f0f0f0d5f0f2f0f2f0f8d5d5c5f0f0f0f0f0f0f0f1f0f9f0f0f0f0f0f0f0f1f1f3f0f0f
0f0f0f0f0f0f0f0f0f0f0f1f0f0f0f0f0f0f0f0f0f0f0f7f2f0f0f0f0f0f0f0f0f0f0f0f0f
0f0f0f1f2f0f0f0f0f0f0e6f0f0f0f0f0f0f5f8f1f5f0f2404040d2d8c84040d2e5c
1d9f0f1f0f0c1f360d4e4c74040f0f6f0f5f1f0f6c4f0f0d9f0d70d0a00da03e9
f2f1f0f0f0f0f5f2f5f240404040404040404040003800370039003a003900
390039003900390039003d00430042004500470047004800460046004
900490049004700470046004500430042004300420041004200420041
00410040003f0040003f003f003e003e003e003f003c0037003a0038003
600360038003800370035003700370035003500360034003400380038
0038003a003a00380038003a003b003a003b003c003b003a003b003c00
3a0039003b003c003d003e003e003e003c003a003b003b0039003a0038
00390039003800380d0a00da0001f2f1f0f0f0f0f5f2f5f540404040404040
404040d7c8c9d3c1c4c5d3d7c8c9c140c5c1c7d3c5e240f1f4f0f140d7c1e
3e3c9e2d6d540c1e540404040d7c8c9d3c1c4c5d3d7c8c9c14040404040
404040f0f3f3f9f360f0f0f2f0f540404040404040404040404040c4c4e8f0f
0f0f2d5c5c2c9f0f6f0f4f1f0f0f0f0f1f0f6f0f5f1f0f2f4f0f0c4e3f0f0f0f0f0f04b
d4e5f14040404040404040404040404040404040404040404040404040
404040404040404040404040404040404040404040404040404040404
0404040404040404040400af2f1f0f0f0f0f5f2f5f54040404040404040404
0f2f1f0f0f0f0f5f2f5f540404040d9e3f0f3c140c8f4f1f1f3f9f9f2f0f24040f0f
6f0f4f1f0f0f0f0f1f0f6f0f5f1f0f2f4f0f0f0f0f0f0f0f0f0f0f0f0d5f0f1f0f1f0f1d
5d5c5f0f0f0f0f1f2f5f1f3f3f0f0f0f0f1f3f0f2f1f2f0f0f0f0f0f0f0f0f0f0f0f0f0f0
f1f0f0f0f0f0f0f0f0f0f0f3f4f5f6f0f0f0f0f0f0f0f0f0f0f0f0f0f0f3f8f4f0f0f0f0e
6f0f0f0f0f0f3f5f5f3f3f0f2404040d2e6c840404040d2e6f0f1f0f0c1f360d4
e4c74040f0f6f0f5f1f0f6c4f0f0d9f0d70d0a00da03e9f2f1f0f0f0f0f5f2f5f54
040404040404040404000d900d900da00d300c800d20108011b015501
6c019501ba01b301dd01f201e701e801fe021c0236024d0245024a024e0
2510252026d02520243023d021e020601f601e801d001c501760169017
2013d012d00e900e000d700e500df00df00df00d900d800d900d600d300
d800e100d7011c012d013b0156016701730175017d0187018201d201ca
01cb01e401e301eb01f101f101d201d401c101bf01c201b701bb0163011
b010f00e400eb00f400ec00f200ef00e500ec00f900ee00f500ef0d0a00da0
00af2f1f0f0f0f0f5f2f5f540404040404040404040f2f1f0f0f0f0f5f2f5f5404
04040d9e3f0f3c140c8f4f1f1f3f9f9f2f0f24040f0f6f0f4f1f0f0f0f0f1f0f6f0f5
f1f0f2f4f0f0f0f0f0f0f0f0f0f0f0f0d5f0f2f0f2f0f8d5d5c5f0f0f0f0f1f0f5f0f2f2
f0f0f0f0f1f0f9f7f0f6f0f0f0f0f0f0f0f0f0f0f0f0f0f0f1f0f0f0f0f0f0f0f0f0f0f3f4
f5f6f0f0f0f0f0f0f0f0f0f0f0f0f0f0f3f8f4f0f0f0f0e6f0f0f0f0f0f3f2f7f7f0f0f24
04040d2d8c84040d2e5c1d9f0f1f0f0c1f360d4e4c74040f0f6f0f5f1f0f6c4f
0f0d9f0d70d0a00da03e9f2f1f0f0f0f0f5f2f5f54040404040404040404000
c800c800ce00c600bf00c400f4010b014101540183019f019501ba01c401
c201c201d001de01fb020601ff0209020b020c020e0224021301fd01ff01
df01d001bf01b601a2019a01490138013b0116010d00d600ce00c900cf0
0cc00ce00ce00ca00cf00ca00ca00c700cf00cc00ca011c012a0137014e01
600169016a016e0171017001a701a101a401be01bf01c101ca01c801ad0
1ac01a101a101a3019b019f01470117010f00e500e500ec00e600ea00e5
00e000e500e900e600ee00e80d0a00da0001f2f1f0f0f0f0f5f2f6f1404040
40404040404040e6c1d360d4c1d9e340e2e3d6d9c5e240c9d5c340f1f8f0
f140e240c4c5d3c1e6c1d9c540c1e54040d7c8c9d3c1c4c5d3d7c8c9c140
40404040404040f9f0f0f3f360f0f0f9f0f340404040404040404040404040
c4c4e8f0f0f0f2d5c5c2c9f0f6f0f4f1f0f0f0f0f1f0f6f0f5f1f0f2f4f0f0c4e3f0f0f
0f0f0f04bd4e5f140404040404040404040404040404040404040404040
404040404040404040404040404040404040404040404040404040404
040404040404040404040404040400af2f1f0f0f0f0f5f2f6f140404040404
040404040f2f1f0f0f0f0f5f2f6f140404040d9e3f0f7c140c8f4f1f1f3f9f9f1f8
f84040f0f6f0f4f1f0f0f0f0f1f0f6f0f5f1f0f2f4f0f0f0f0f0f0f0f0f0f0f0f0d5f0f1
f0f1f0f1d5d5c5f0f0f0f0f0f0f3f0f5f9f0f0f0f0f0f0f3f2f1f9f0f0f0f0f0f0f0f0f0f
0f0f0f0f0f1f0f0f0f0f0f0f0f0f0f0f6f4f8f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f7f2f0f
0f0f0f0e6f0f0f0f0f0f2f4f7f0f1f0f2404040d2e6c840404040d2e6f0f1f0f0c
1f360d4e4c74040f0f6f0f5f1f0f6c4f0f0d9f0d70d0a00da03e9f2f1f0f0f0f0f
5f2f6f14040404040404040404000b800b600bd00bb00bd00c300d500f2
00e300d300ca00d200dc00e300e700f100f800fe01030107010a011a012
001290136012f0130012c0130012e012f01290128012601240123011f01
2d0129012b0123011b010900f800f400ec00b100b100b500ba00bf00bf0
0c800cb00d700fe00eb00ec00da00e000eb00e900ef00f000ff00ff010a011
901180123012a0132013b013801370135013501340139013201390133
012b0128011b0125'[/code]


But i want this in character that is text format

I tried to do with CCSID 1208, but its not working
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Fri Dec 10, 2010 11:08 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Could you have formatted this post in a more inconvienient manner??

What exactly are you attempting here? Converting the text from ASCII to EBCDIC? If it has embedded packed decimals this isn't going to work as you've coded it.

Why have you coded it like this? Why are you not using a message set and the inbuilt conversion?

Where does code page 1208 enter the story?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Dec 10, 2010 11:29 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Packed decimals are not ascii characters.

You do not have an ASCII message file. You have a byte stream, some the bytes of which represent either ASCII or EBCDIC characters, some of which represent packed decimal numbers.

You can, with some effort, create a CWF model to parse this.
Back to top
View user's profile Send private message
HiLee
PostPosted: Fri Dec 10, 2010 11:31 am Post subject: Reply with quote

Newbie

Joined: 10 Dec 2010
Posts: 7

Input message - ASCII data with packed decimal
Output message - readable text / characters / numbers on which i can write business logic
I have tried to
following things as well

SET OutputRoot.MQMD.CodedCharSetId = 500;
SET OutputRoot.MQMD.Encoding = 785;
SET OutputRoot.MQMD.Format = 'MQIMS';
SET MessageChar = CAST (MessageBlob AS BLOB CCSID OutputRoot.MQMD.CodedCharSetId);
SET OutputRoot.Properties.MessageFormat = 'Text1';
SET OutputRoot.Properties.MessageSet = 'I3GAL4S002001';
SET OutputRoot.Properties.MessageType = 'CELLNET_readings_msg';
SET OutputRoot.MRM = MessageChar;

i am confused with which CCSID & encoding i should use
I tried CCSID 1208, since its for character data
But i need to sort this out asap
please help
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Fri Dec 10, 2010 11:46 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

HiLee wrote:
i am confused with which CCSID & encoding i should use


I'm confused about a) why you're trying to turn this into a BLOB rather than a character and b) why you think a character string will still have numbers in it that will be of any use to you.

HiLee wrote:
I tried CCSID 1208, since its for character data


No it's not - it's mixed data and this method is fatally flawed.

HiLee wrote:
But i need to sort this out asap
please help


You'll get more help if you manage to explain what your requirement is and why you've ended up with this rather odd (and probably doomed) method. For example, the code snippet you posted has a message set id in it; what does that message set describe? Why are you not using that & instead trying to squeeze everything into a character string? And then (if I'm reading the code correctly) throwing it at the message set & trying to parse it?

Better information, better advice.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
HiLee
PostPosted: Fri Dec 10, 2010 11:59 am Post subject: Reply with quote

Newbie

Joined: 10 Dec 2010
Posts: 7

my requirement is simple
I have a input message with ASCII values & packed decimal values and i want to convert into readable string
I tried to do using CCSID & Encoding but its not working for me, i am making some mistake somewhere not able to figure out where
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Fri Dec 10, 2010 12:08 pm Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

HiLee wrote:
I have a input message with ASCII values & packed decimal values and i want to convert into readable string


You're doomed and you need to push back on the requirement. You can't convert anything that contains packed decimal values into a readable string.

You can convert it into a useable format, but you don't seem to want to be doing that.

HiLee wrote:
I tried to do using CCSID & Encoding but its not working for me


It won't.

HiLee wrote:
i am making some mistake somewhere not able to figure out where


You're treating packed decimal numbers as if they're text. That's the mistake.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
HiLee
PostPosted: Fri Dec 10, 2010 12:20 pm Post subject: Reply with quote

Newbie

Joined: 10 Dec 2010
Posts: 7

Can I break the inout message in 2 parts
1. ASCII values
2. Packed decimal

& then treat them seperately

Will this work & if yes i want to know which CCSID & Encoding i need to use
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Fri Dec 10, 2010 12:25 pm Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

HiLee wrote:
Will this work & if yes i want to know which CCSID & Encoding i need to use


No it won't. Even assuming the message is in 2 convienient parts, with text in 1 part and the numbers in the other. In my experience embedded packed decimal tends to be more, well, embedded in the message.

You still haven't answered why you're determined to convert this to a string in the face of all sense & reason. And why this string is being fed to a message set which may or may not describe the message.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
HiLee
PostPosted: Fri Dec 10, 2010 12:33 pm Post subject: Reply with quote

Newbie

Joined: 10 Dec 2010
Posts: 7

Please let me know if I have complete segreggation of the text & numeric data, then also its not possible to parse them seperately

And
The reason why I decided to convert it to string is, I thought once i have correct data in d string, i know how to manipulate the string
I may be wrong as well
But is there is better way to do it
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Fri Dec 10, 2010 12:43 pm Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

HiLee wrote:
Please let me know if I have complete segreggation of the text & numeric data, then also its not possible to parse them seperately


If they are in 2 completely separate areas, and you can identify the lengths of the areas with 100% reliability, then you should be able to parse them separately.

It's not something I'd want to try, I don't see how you'd get it to work without knowing the length of each individual packed number (because of the inherent sign) and it's at best reinventing the wheel.

HiLee wrote:
The reason why I decided to convert it to string is, I thought once i have correct data in d string, i know how to manipulate the string


But if you've got packed data in the string, how do you manipulate that without knowing all the lengths? I (still) don't see how this would ever have worked and hence don't see what you're trying to do.

HiLee wrote:
But is there is better way to do it


Well you're using a piece of software which is mostly involved with the identification, parsing, transformation & manipulation of data as it moves through various platforms. So I'd have used some of the facilities it offers;I and others have mentioned messages sets & you seem to be referencing one.

But again, you're using it in reference to this string you're trying to build. So I don't see where you're going with this.

The only other thing I've managed to infer is you're using the IMS bridge. Which potentially means this message you're trying to convert has some headers on it. This could also be causing you problems.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Dec 10, 2010 12:51 pm Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If you're sending a message to IMS, I believe that IMS does not do an MQGET with convert at the bridge.

This means your data can't be in ASCII in the first place, it has to already be in EBCDIC.

Which you should accomplish by building a message set and using it and knowing the right CCSID and Encoding to set on the outbound MQ message by asking your team or project lead.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Dec 10, 2010 1:00 pm Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
If you're sending a message to IMS, I believe that IMS does not do an MQGET with convert at the bridge.

This means your data can't be in ASCII in the first place, it has to already be in EBCDIC.


Probably, but I wouldn't rely on it

mqjeff wrote:
Which you should accomplish by building a message set and using it and knowing the right CCSID and Encoding to set on the outbound MQ message by asking your team or project lead.




Whatever CCSID or formats are in use in IMS & elsewhere.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Dec 10, 2010 1:49 pm Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I thought once i have correct data in d string, i know how to manipulate the string
Stop. You are confused.

Converting the data to a string will not make it easier or harder to process. Message broker offers several ways to process your message data ( ESQL, Java, PHP, Mapping ), but none of them need you to convert your data to a string first.

You need to convert your data into a message tree. If you do not do this, message broker will not be able to process your message. To convert your data to a message tree, you need to
- create a message set
- add a physical format ( probably CWF )
- create one or more message definition files to describe your data
- set your input node to refer to the message set, message name and physical format

If you follow those steps then the input node will emit a message tree that is simple and easy to process in the rest of your flow. No other solution is worth exploring.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sat Dec 11, 2010 12:10 am Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

kimbert wrote:

You need to convert your data into a message tree. If you do not do this, message broker will not be able to process your message. To convert your data to a message tree, you need to
- create a message set
- add a physical format ( probably CWF )
- create one or more message definition files to describe your data
- set your input node to refer to the message set, message name and physical format

If you follow those steps then the input node will emit a message tree that is simple and easy to process in the rest of your flow. No other solution is worth exploring.


As Kimbert says 'This is the Way to do it'. {images of punch & judy shows here}
This is also Message Broker Parsing 102 - Non XML Files. {or as Mr S Holmes says, 'Elementary my Dear Watson'}
_________________
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
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) Supportunable to read the ascill values with packed decimal embeded
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.