Author |
Message
|
Sam12345 |
Posted: Wed Oct 15, 2003 4:33 am Post subject: MQGET convert EBCDIC to ASCII? |
|
|
Novice
Joined: 11 Sep 2003 Posts: 15
|
I am reading a mainframe message that is in EBCDIC.
I am using these options (written in Perl):
my $GetMsgOpts = {
Options =>
MQGMO_ACCEPT_TRUNCATED_MSG => 64,
MQGMO_WAIT,
MQGMO_NO_SYNCPOI-NT,
MQGMO_CONVERT,
};
But my message is still junkish (tech term)...
I cannot find specific info on EBCDIC convert.
Any help greatly appreciated!
Sam |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Oct 15, 2003 5:32 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
What does the MQMD Format field have in it? You can use the amqsbcg sample to look at it. If it isn't "MQSTR ", MQ will have trouble converting it. |
|
Back to top |
|
 |
Sam12345 |
Posted: Wed Oct 15, 2003 5:57 am Post subject: |
|
|
Novice
Joined: 11 Sep 2003 Posts: 15
|
This is the msg Descriptor
my $MsgDesc = {ReplyToQ => ("OUTPUT"),
Format => MQFMT_STRING}; # MQGet message descriptor |
|
Back to top |
|
 |
mrlinux |
Posted: Wed Oct 15, 2003 6:17 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
The application that is putting the ebcdic message on the queue must
set the MQMD Format field to MQSTR, otherwise it will not get converted on the get. _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
Sam12345 |
Posted: Wed Oct 15, 2003 6:25 am Post subject: |
|
|
Novice
Joined: 11 Sep 2003 Posts: 15
|
|
Back to top |
|
 |
mrlinux |
Posted: Wed Oct 15, 2003 6:53 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Well you should be able to look at it and tell if they are ??? _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
Sam12345 |
Posted: Wed Oct 15, 2003 7:23 am Post subject: |
|
|
Novice
Joined: 11 Sep 2003 Posts: 15
|
They are.
Do I have to set Encoding or CodedCharSetId to ASCII, somehow?
Thank you for your time and patience. |
|
Back to top |
|
 |
mrlinux |
Posted: Wed Oct 15, 2003 7:49 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
You shouldnt need to do anything,
are you client connecting to the mainframe ????
also the MQMD.FORMAT field is 8 bytes long, it "MQSTR " ???
There should be 3 spaces following "MQSTR" They dont seem to show
up on this page _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Oct 15, 2003 9:19 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Try using amqsbcg to look at the message. It will dump out the MQMD format so that you can see what actually got put on the queue. |
|
Back to top |
|
 |
|