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 » General Discussion » Client NTWorkStations and Server AS/400

Post new topic  Reply to topic
 Client NTWorkStations and Server AS/400 « View previous topic :: View next topic » 
Author Message
iabarca
PostPosted: Wed May 01, 2002 10:27 am    Post subject: Reply with quote

Newbie

Joined: 29 Apr 2002
Posts: 9

Hi,

I instaled the next components for client from Download MQSeries for Windows NT and Windows 2000 Version 5 Realease 2, with defaults.

Component Client.
Component Development Toolkit.
Component Internet Gateway.

When I executed the example program MQAXTRIV trail ( VB ), I have the errors message:

MQAX200.MQSession:AccesssQueueManager
MQSeries Completion Code = 2
MQSeries Reason Code = 2058
Reason Name: ( MQRC_Q_MGR_NAME_ERROR )

Please tell me, I need to reset the defaults to, how I do it?

Queue Manager : I400MIAMI.RIBS
Request queue : MI.RIBS.REQUEST ( to send their request to )
Reply queue : MI.RIBS.REPLY ( to receive reply from )
Channel name : SERVER.TO.I400MIAMI

Thanks in advance.

Yuri



PD: This the code:



Option Explicit

Private Sub Form_Click()

'*******************************************************************************
'* This simple example illustrates how to put and get an MQSeries message to and
'* from an MQSeries message queue. The data from the message returned by the get
'* is read and compared with that from the original message.
'*******************************************************************************
Dim MQSess As MQSession '* session object , es una clase
Dim QMgr As MQQueueManager '* queue manager object , es una clase
Dim Queue As MQQueue '* queue object , es una clase
Dim PutMsg As MQMessage '* message object for put, es una clase
Dim GetMsg As MQMessage '* message object for get
Dim PutOptions As MQPutMessageOptions '* get message options, es una clase
Dim GetOptions As MQGetMessageOptions '* put message options
Dim PutMsgStr As String '* put message data string
Dim GetMsgStr As String '* get message data string

'*******************************************************************************
'* Handle errors
'*******************************************************************************
On Error GoTo HandleError

'*******************************************************************************
'* Initialize the current position for the form
'*******************************************************************************
CurrentX = 0
CurrentY = 0

'*******************************************************************************
'* Create the MQSession object and access the MQQueueManager and (local) MQQueue
'*******************************************************************************
Set MQSess = New MQSession
Set QMgr = MQSess.AccessQueueManager("")
Set Queue = QMgr.AccessQueue("MI.RIBS.REQUEST", _
MQOO_OUTPUT Or MQOO_INPUT_AS_Q_DEF)

'*******************************************************************************
'* Create a new MQMessage object for use with put, add some data then create an
'* MQPutMessageOptions object and put the message
'*******************************************************************************
Set PutMsg = MQSess.AccessMessage()
PutMsgStr = "12345678 " & Time

'mqenvironment.
PutMsg.MessageData = PutMsgStr
Set PutOptions = MQSess.AccessPutMessageOptions()
PutOptions.Options = PutOptions.Options Or MQPMO_NO_SYNCPOINT
Queue.Put PutMsg, PutOptions

'*******************************************************************************
'* Create a new MQMessage object for use with get, set the MessageId (to that of
'* the message that was put), create an MQGetMessageOptions object and get the
'* message.
'*
'* Note: Setting the MessageId ensures that the get returns the MQMessage
'* that was put earlier.
'*******************************************************************************
Set GetMsg = MQSess.AccessMessage()
GetMsg.MessageId = PutMsg.MessageId
Set GetOptions = MQSess.AccessGetMessageOptions()
GetOptions.Options = GetOptions.Options Or MQGMO_NO_SYNCPOINT
Queue.Get GetMsg, GetOptions

'*******************************************************************************
'* Read the data from the message returned by the get, compare it with that
'* from the original message and output a suitable message.
'*******************************************************************************
GetMsgStr = GetMsg.MessageData
Cls
If GetMsgStr = PutMsgStr Then
BackColor = RGB(127, 255, 127) '* set to green for ok
Print
Print "Message data comparison was successful."
Print "Message data: """ & GetMsgStr & """"
Else
BackColor = RGB(255, 255, 127) '* set to amber for compare error
Print "Compare error: "
Print "The message data returned by the get did not match the " & _
"input data from the original message that was put."
Print
Print "Input message data: """ & PutMsgStr & """"
Print "Returned message data: """ & GetMsgStr & """"
End If

Exit Sub
'*******************************************************************************
'* Handle errors
'*******************************************************************************
HandleError:
Dim ErrMsg As String
Dim StrPos As Integer

Cls
BackColor = RGB(255, 0, 0) '* set to red for error
Print "An error occurred as follows:"
Print ""
If MQSess.CompletionCode <> MQCC_OK Then
ErrMsg = Err.Description
StrPos = InStr(ErrMsg, " ") ' * search for first blank
If StrPos > 0 Then
Print " Left(ErrMsg, StrPos) : " & Left(ErrMsg, StrPos) '* print offending MQAX object name
Else
Print " Error(Err) : " & Error(Err) '* print complete error object
End If
Print ""
Print "Method MQSess: MQSeries Completion Code = " & MQSess.CompletionCode
Print "Method MQSess: MQSeries Reason Code = " & MQSess.ReasonCode
Print "Method MQSess.ReasonName: (" & MQSess.ReasonName & ")"
Else
Print "Visual Basic error: " & Err
Print Error(Err)
End If

Exit Sub

End Sub
Private Sub Form_Paint()
Cls
Print "Click anywhere within this form to run the test."
Print ""
Print "A simple message will be put to an MQSeries message queue and"
Print "then read back from the queue and compared with the original." '
End Sub
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 » General Discussion » Client NTWorkStations and Server AS/400
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.