Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MQRC_Q_MGR_NAME_ERROR = 2058

Status
Not open for further replies.

Arak33

Programmer
Jul 7, 2003
2
US
I have a VB 6.0 Dll, which puts & gets messages from a MqSeries Queue. I use the following code to open a queue.
_________________________________________________________
Private Sub OpenConnectionToQueueServer(CompCode As Long, strMsg As String)
On Error GoTo ErrorHandler

Dim Reason As Long 'reason code
' Dim o_Options As Long 'open options
' Dim od As MQOD 'object descriptor
' Dim cnocd As MQCNOCD 'connect / channel definition

strMsg = "Open Connection To Queue Server:"

If gHcon = 0 Then
MQCNOCD_DEFAULTS cnocd
cnocd.ChannelDef.ChannelName = mstrQChannel
cnocd.ChannelDef.TransportType = MQXPT_TCP
cnocd.ChannelDef.QMgrName = mstrQmgr
cnocd.ChannelDef.ChannelType = MQCHT_CLNTCONN
cnocd.ChannelDef.ConnectionName = mstrQSvrnme
'connect to the specified Queue Manager
MQCONNXAny cnocd.ChannelDef.QMgrName, cnocd, gHcon, CompCode, Reason
PutRCMsg (Reason)
If CompCode = MQCC_WARNING Or CompCode = MQCC_OK Then
CompCode = 0
strMsg = strMsg & " OpenConnectionToQueueServer Connection Succeeded"
Else
'problem connecting
CompCode = 1
strMsg = strMsg & " OpenConnectionToQueueServer Connection Failed ReasonCode-" & mstrQReason
End If

Else
CompCode = -1
strMsg = strMsg & " Application Error"
End If
Exit Sub

ErrorHandler:

CompCode = -1
strMsg = strMsg & " Runtime Error"
Err.Raise Err.Number

End Sub
____________________________________________________________

The problem I have is whenever I send a request I get a response, but if I immediately try to resend the same request I get a MQRC_Q_MGR_NAME_ERROR = 2058 error although none of the values have changed. Any help is highly appreciated.

Thanks,
-Arak-
 
All,
I have figured the problem. It has to do with setting up of Environment variables. Once you setup the MQSERVER value the problem goes away.

Thanks,
Arak
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top