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 Index » IBM MQ API Support » MQAX200.DLL

Post new topic  Reply to topic
 MQAX200.DLL « View previous topic :: View next topic » 
Author Message
marksinnott
PostPosted: Tue Oct 21, 2003 5:58 am    Post subject: MQAX200.DLL Reply with quote

Novice

Joined: 06 Oct 2003
Posts: 21

Hi
Does anyone know where I can find documenation on this DLL.

I am sending a message from os390 to MQ on NT. I pick up the message using VB and MQAX200.dll

No matter what I put in MDMD_Format or MQGMO_Convert when I look at
InputQueue.Get GetMsg, GetOptions

GetMsg.MessageData its in ASCII.

When I look at it with AMQSGETC it is fine as its in EBCDIC and goes to ASCII id I change the format sting on the mainnframe put to "MQSTR". Can anyone please help ? Id really appreciate it.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 21, 2003 7:58 am    Post subject: Re: MQAX200.DLL Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

marksinnott wrote:
Hi
Does anyone know where I can find documenation on this DLL.
Did you try the button at the top of this page labeled 'Documentation'? Maybe you'll find what you want there, for this platform specific question.
Did you try using the search function here, to find if other people have had the same questions? I know for a fact that I personally have provided links to the manual in question at least three times in the last month.
marksinnott wrote:
I am sending a message from os390 to MQ on NT. I pick up the message using VB and MQAX200.dll

No matter what I put in MDMD_Format or MQGMO_Convert when I look at
InputQueue.Get GetMsg, GetOptions

GetMsg.MessageData its in ASCII.

When I look at it with AMQSGETC it is fine as its in EBCDIC and goes to ASCII id I change the format sting on the mainnframe put to "MQSTR". Can anyone please help ? Id really appreciate it.

The proper value is not "MQSTR". It's "MQSTR ", with three spaces after it.

What is your exact problem? That the message you send to your OS/390 from your VB program is not converted From ASCII to EBCDIC? Or that your message FROM OS/390 is not converted from EBCDIC to ASCII? Or that your message is being converted and you don't want it to be?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
marksinnott
PostPosted: Tue Oct 21, 2003 8:49 am    Post subject: Reply with quote

Novice

Joined: 06 Oct 2003
Posts: 21

hI

Thanks for your speedy reply. Apols in relation to the documentation i didnt realise it was CHAPTER 3.

I have MQ on Mainframe and on NT. I know that translation is switched off on both platforms.

When I send a message from OS390 to NT Server I expect to pick it up in gooble de gook ie EBCDIC on NT. This is the case when i use the supplied client program AMQSGETC WITH THE QUEUE NAME.

However when i try to MQGET using a VB program com object MQAX200.dll and when i look at the MESSAGEDATA it is in ASCII. I Need the message in EBCDIC (OS390).

Below is a sample log and u can see the message arriving with the value "THIS IS IT" you can see it is gotten in MQ and then MQAX seems to go off and translates it to ASCII.

If you have any ideas I be very grateful.

-->MQMessage::GetMessageId
!(00243) ++ object 2b89dd8 precounts(0)
!(00243) -- object 2b89dd8 precounts(1)
!(00243)return bstr as BSTR

<--MQMessage::GetMessageId (rc= MQRC_NONE)

-->MQMessage::GetUserId
!(00243) ++ object 2b89dd8 precounts(0)
!(00243) -- object 2b89dd8 precounts(1)
!(00243)return bstr as BSTR

<--MQMessage::GetUserId (rc= MQRC_NONE)

-->MQMessage::GetMessageData
!(00243) ++ object 2b89dd8 precounts(0)

---->ConvertStrToDefault
!(00243)Readstring instrlen = 100
!(00243)String before conversion:
0000 E3 C8 C9 E2 40 C9 E2 40 C9 E3 40 40 40 40 40 40 : ãÈÉâ@Éâ@Éã@@@@@@
0010 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 : @@@@@@@@@@@@@@@@
--- 4 lines identical to above ---
0060 40 40 40 40 : @@@@
!(00243)Character set conversion from 285 to 1200, rc = 0
!(00243)String passed to LotusScript:
0000 54 00 48 00 49 00 53 00 20 00 49 00 53 00 20 00 : T.H.I.S. .I.S. .
0010 49 00 54 00 20 00 20 00 20 00 20 00 20 00 20 00 : I.T. . . . . . .
0020 20 00 20 00 20 00 20 00 20 00 20 00 20 00 20 00 : . . . . . . . .
--- 9 lines identical to above ---
00C0 20 00 20 00 20 00 20 00 : . . . .

<----ConvertStrToDefault (rc= MQRC_NONE)
!(00243)Input length was 100, output length was 200
!(00243) -- object 2b89dd8 precounts(1)
!(00243)return bstr as BSTR

<--MQMessage::GetMessageData (rc= MQRC_NONE)

-->MQSession::GetCompletionCode
!(00243) ++ object 2b96ed0 precounts(0)
!(00243) -- object 2b96ed0 precounts(1)

<--MQSession::GetCompletionCode (rc= MQRC_NONE)
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 21, 2003 9:09 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Okay. You do not want your message data to be converted, and yet it is being converted.

You've said you aren't specifying any channel conversion. You should double-check that, although you probably already have.

You've said it doesn't matter what you specify for your GetMessageOptions. This also deserves some double-checking.

Can I see your actual VB code for both setting your get options and for retrieving the message?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
marksinnott
PostPosted: Wed Oct 22, 2003 1:21 am    Post subject: Reply with quote

Novice

Joined: 06 Oct 2003
Posts: 21

Hi Thanks again for your reply.

1) Yes i do not want the message translated into ASCII I want it in EBCDIC when my VB application receives it.

2) If I use the sample .exe provided by MQ everything is fine as when i rin the get on NT through this exe it is in EBCDIC ie unreadable.

Here is the code for give the mess but i have been trying masny ways to try and get it NOT to translate. The key part is SUB Read. I have logging turned on and when i look at log after the stop i can see it translating from EBCDIC to ASCII per previous mail. I have put a zillion things into GETMSG.FORMAT from blanks to MQSTR and no matter what it gets converted. Although reading the docs once I dont set GETMSG.OPTIONS with MQGMO_CONVERT it should not do any conversion.

Thanks



Public MQSess As MQSession '* session object
Public QMgr As MQQueueManager '* queue manager object
Public InputQueue As MQQueue '* input queue object
Public OutputQueue As MQQueue '* output queue object
Public PutMsg As MQMessage '* message object for put
Public GetMsg As MQMessage '* message object for get
Public PutOptions As MQPutMessageOptions '* get message options
Public GetOptions As MQGetMessageOptions '* put message options
Public PutMsgStr As String '* put message data string
Public CustomerLength As Long '* Length of customer name
Public Customer As String '* Customer name
Public Month As Long
Public DepositTotal As String
Public WithdrawalTotal As String

Dim Finish As Boolean
Dim Started As Boolean
Const CUSTOMERFOUND = 1
Const ForWriting = 2

Const MONTHCOUNTDEPOSITS = 12
Const MONTHCOUNTWITHDRAWALS = 12
Const THREE_SECONDS = 3000
Const MT_BANK_TEST = 65536
Const MT_BANK_REQUEST = 65537
Const MT_BANK_REPLY = 65538
Const BANK_TEST_RESPONSE = "This is a bank test response."

Public Sub ServiceLog(strMessage As String)
Call frmMain.NTService.LogEvent(svcMessageError, svcEventError, strMessage)
End Sub



Sub MQInit()
Set MQSess = New MQSession
Set QMgr = MQSess.AccessQueueManager("")
Set InputQueue = QMgr.AccessQueue("NUBR.BPS.ISIS.REPLY", MQOO_INPUT_SHARED)
Set GetOptions = MQSess.AccessGetMessageOptions()
GetOptions.Options = MQGMO_WAIT Or MQGMO_NO_SYNCPOINT
GetOptions.WaitInterval = THREE_SECONDS
Set OutputQueue = QMgr.AccessQueue("NUBR.BPS.ISIS", MQOO_OUTPUT)
Set PutOptions = MQSess.AccessPutMessageOptions()
PutOptions.Options = MQPMO_NO_SYNCPOINT
On Error GoTo HandleError
'*******************************************************************************
'* Loop while no close request has been issued for the form
'*******************************************************************************
Started = True

Finish = False
MQRead
End
Exit Sub
HandleError:


ServiceLog ("An error occurred as follows:" + "Visual Basic error: " & Err & Error(Err) & "MQSeries Completion Code = " & MQSess.CompletionCode & "MQSeries Reason Code = " & MQSess.ReasonCode & "(" & MQSess.ReasonName & ")")

Exit Sub
End Sub



Sub MQRead()


Dim ANS As String
Set GetMsg = MQSess.AccessMessage()
GetMsg.Format = "MQSTR "
MQSess.ExceptionThreshold = 3 '* process GetMsg errors in line

GetOptions.WaitInterval = MQWI_UNLIMITED
GetOptions.Options = GetOptions.Options Or MQGMO_NONE

InputQueue.Get GetMsg, GetOptions

Stop
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Oct 22, 2003 4:03 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Okay, that all looks reasonable.

One possibility (and I'm probably wrong about this). You're doing
Code:
MQSess.AccessGetMessageOptions()
which could be giving you some default values. Although
Code:
GetOptions.Options = MQGMO_WAIT Or MQGMO_NO_SYNCPOINT
should be taking care of that. Except that you should be doing addition
Code:
GetOptions.Options = MQGMO_WAIT + MQGMO_NO_SYNCPOINT
instead of the Or operation.

Also, how are you retrieving the data from the message? Are you accessing the MessageData property, or are you using one or many of the Read functions?

Because I'm pretty sure the MessageData property only returns a converted ASCII string.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
marksinnott
PostPosted: Wed Oct 22, 2003 8:31 am    Post subject: Reply with quote

Novice

Joined: 06 Oct 2003
Posts: 21

Hi Thanks Again

I have added the following code

Dim aaa As Variant
Let aaa = GetMsg.Read(700)
Dim GGGG As Variant
Let GGGG = GetMsg.MessageData
Debug.Print aaa
Debug.Print GGGG

For aaa I get a whole load of "?" i.e.
?????????????????????????????????? (This is NOT EBCDIC)
And for GGGG I get the values in ASCII
sis$\data\ MAPS_L20031022

I must admit Im disapointed with IBM. When I look at manual for MESSAGeData propery it mentions nothing about ASCII only. If you can only read it in ASCII why would u need to swtich conversion on.

I suppose at this stage Ill give up on the poroblem, but thank you for your help.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Oct 22, 2003 9:19 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

marksinnott wrote:
For aaa I get a whole load of "?" i.e.
?????????????????????????????????? (This is NOT EBCDIC)
Actually, it probably is. It's just probably being converted from the EBCDIC byte values to the question marks by whatever you're using to display it.

If you were able to get a hex dump, it would probably look like what you want it to.
marksinnott wrote:
And for GGGG I get the values in ASCII
sis$\data\ MAPS_L20031022

Which is converted to ASCII.
marksinnott wrote:
I must admit Im disapointed with IBM. When I look at manual for MESSAGeData propery it mentions nothing about ASCII only. If you can only read it in ASCII why would u need to swtich conversion on.
Oh, I think the manual does say something about this.
Using the Component Model Interface wrote:
MessageData property
Read-write. Retrieves or sets the entire contents of a message as a character string(my emphasis)
But it may not say it very well.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
marksinnott
PostPosted: Thu Oct 23, 2003 1:44 am    Post subject: Reply with quote

Novice

Joined: 06 Oct 2003
Posts: 21

Hi Thanks for your reply

If the Messagedata property is recieving character string it should be able to receive it in EBCDIC and should look like ãÈÉâ@Éâ@Éã@@@@@@ not ??????????.

As im probably only one of the few people not wanting ASCII translation I imgaine this is probably an existing bug with the object.

Ill just get someone to write a small prog to convert ascii to ebcdic.


Thanks for your help though. Ill report the issue to IBM as we are a big customer of theirs.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MQAX200.DLL
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.