|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
  |
|
MQ Format Data conversion problem for jpg |
View previous topic :: View next topic |
Author |
Message
|
cheeming |
Posted: Fri Mar 05, 2004 2:07 am Post subject: MQ Format Data conversion problem for jpg |
|
|
Newbie
Joined: 04 Mar 2004 Posts: 1
|
Hi Everyone,
I've run into a problem and I'd like to ask the experts out there.
My environment consists of the following:
1. Two hosts - a NT workstation running MQ5.1 Client, a MQ5.1 NT server and a OS/390 Mainframe environment running MQ5.3.
2. My Objective is to transfer a JPG file which is formatted to a VB string, from the NT client to the Mainframe environment (COBOL/CICS)
3. The application is written in VB on NT platforms and is using MQAX200.dll for the API call.
4. Within the MQ header, the "Format" field is set "MQC.MQFMT_STRING".
5. For Sender/receiver channel pairs, no exits are used. Data Conversion is set to yes on the sender channel.
6. Message from NT has CCSID of 437 whereas Mainframe has a CCISD of 500.
7. As a JPG typically consists of some odd characters, after assigning to messsage data and put to the transmission queue, I browse
transmission queue at NT server. It is shown as follows:
98 7F 98 85 00 10 4A 46 ......JF
49 46 00 01 02 00 00 01 IF......
00 01 00 00 98 7F 00 43 .......C
00 0A 07 07 08 07 06 0A ........
08 08 08 0B 0A 0A 0B 0E ........
18 10 0E 0D 0D 0E 1D 15 ........
16 11 18 23 1F 25 24 22 ...#.%$"
1F 22 21 26 2B 37 2F 26 ."!&+7/&
29 34 29 21 22 30 41 31 )4)!"0A1
34 39 3B 3E 3E 3E 25 2E 49;>>>%.
44 49 43 3C 48 37 3D 3E DIC<H7=>
3B 98 7F 00 43 01 0A 0B ;...C...
0B 0E 0D 0E 1A 10 10 1A ........
3B 28 22 28 3B 3B 3B 3B ;("(;;;;
whereas the actual jpg data is:
ÿØÿà JFIF ÿÛ C #%$""!&+7/&)4)!"0A149;>>>%.DIC<H7=>;ÿÛ C;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ÿÀ W Ë" ÿÄ ÿÄ µ } !1AQa"q2‘¡#B±ÁRÑð$3br‚
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ
ÿÄ µ w !1AQaq"2B‘¡±Á #3RðbrÑ
$4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄ
Judging from the first character of the jpg, ÿ should be HexFF and not converted to Hex98 as indicated. Anyone has any idea on what is going on? Even from ASCII to EBCDIC, value should be not be Hex98. Pls help. |
|
Back to top |
|
 |
JasonE |
Posted: Fri Mar 05, 2004 5:34 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
I dont understand why you are trying to get conversion. Jpgs are binary data, and a fixed format. If you ftp a file from PC to mainframe, surely you would upload it as binary.
Putting the format as string tells MQ to treat the data as characters, and handle appropriately. I would imagine this would severly ruin the JPG data. You mention you loaded it into a VB string, which is fine in some respects, but that doesnt mean MQ has to treat it as a string. Just leave the format blank to prevent conversion |
|
Back to top |
|
 |
oz1ccg |
Posted: Fri Mar 05, 2004 5:34 am Post subject: |
|
|
 Yatiri
Joined: 10 Feb 2002 Posts: 628 Location: Denmark
|
Hmm, why are you trying to convert a JPG-file from ASCII to EBCDIC ?
Quote: |
4. Within the MQ header, the "Format" field is set "MQC.MQFMT_STRING".
5. For Sender/receiver channel pairs, no exits are used. Data Conversion is set to yes on the sender channel. |
This happens because MQ think it's a character string, and the sender channels is ordered to do the conversion.
I would have chossen another approach:
Quote: |
4. Within the MQ header, the "Format" field is set "MQC.MQFMT_NONE". |
And why that? I will not have WebSphere MQ to do any conversion on my binary data.
Just my $0.02  _________________ Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT. |
|
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
|
|
|
|