I have made several changes to the code as for your suggestions.
Now I am able to get the Reason code as zero.
But still the array called names being used was getting the value as null.
I'm trying to inquire the cluster queue manager attributes, I have tried several ways to get the Queue Managers names in Cluster
But unable to get the results