I had the following vb.net code in my question How to send a PCF Message under syncpoint?:
Try
' use PCF to get queue information.
Dim agent As New PCFMessageAgent(qmgr)
Dim request As New PCFMessage(CMQCFC.MQCMD_INQUIRE_Q)
request.AddParameter(MQC.MQCA_Q_NAME, queueName)
Dim responses As PCFMessage() = Nothing
Try
responses = agent.Send(request)
Catch pcfex As PCFException
LogException(pcfex, {queue}, "Exception checking queue availability via PCF. Assuming false")
Return Nothing
End Try
If responses IsNot Nothing AndAlso responses.Any() Then
' connected
LogDebug("Checking queue availability for " & queue.ToString() & " returned a PCF result.")
return responses
Else
LogError("No result returned from PCF Message request on " & queue.ToString())
Return Nothing
End If
Catch ex As MQException
LogException(ex, {queue})
Return False
End Try
As you can't see, weirdly, the comments cause issues with the formatting - but in my question it did. Here, on the other hand, it seems to be displaying no formatting at all. You'll have to view the edit history in my question to see the issue, then.