Posted: Sun Apr 13, 2014 12:53 pm Post subject: pcf response message unreadable
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
Not sure what i am missing here.
tried a sample from the forum to inquire a q to get its attributes
but the response message i get in the replytoq is unreadable. i do get a 1600 byte message but its all unreadable.
I even tried setting the outputRoot.properties.ccsid, encoding but didnt help.
Code:
CALL CopyMessageHeaders();
SET OutputRoot.MQMD.Encoding = 546;
SET OutputRoot.MQMD.CodedCharSetId = 437;
SET OutputRoot.MQMD.MsgType = MQMT_REQUEST;
SET OutputRoot.MQMD.Format = MQFMT_ADMIN;
SET OutputRoot.MQMD.ReplyToQ = 'TEST.OUT';
SET OutputRoot.MQMD.MsgSeqNumber = 1;
CREATE NEXTSIBLING OF OutputRoot.MQMD DOMAIN 'MQADMIN' NAME 'MQPCF';
DECLARE refRequest REFERENCE TO OutputRoot.MQPCF;
SET refRequest.Type = MQCFT_COMMAND;
SET refRequest.StrucLength = MQCFH_STRUC_LENGTH;
SET refRequest.Version = MQCFH_CURRENT_VERSION;
SET refRequest.Command = MQCMD_INQUIRE_Q;
SET refRequest.MsgSeqNumber = 1;
SET refRequest.Control = MQCFC_LAST;
SET refRequest.Parameter[1] = MQCA_Q_NAME;
SET refRequest.Parameter[1].* = 'TEST';
SET refRequest.Parameter[2] = MQIA_Q_TYPE;
SET refRequest.Parameter[2].* = MQQT_LOCAL;
SET OutputRoot.BLOB.BLOB = asbitstream(OutputRoot.MQPCF CCSID 437);
Parameter 1012 --> paramater ID
1016 --> MQOT_CHLAUTH
Code:
second message
3008 --> command failed
not sure where the MQOT_CHLAUTH is coming from.
my code is as below
Code:
CALL CopyMessageHeaders();
SET OutputRoot.MQMD.Encoding = MQENC_NATIVE;
SET OutputRoot.MQMD.CodedCharSetId = 1208;
SET OutputRoot.MQMD.MsgType = MQMT_REQUEST;
SET OutputRoot.MQMD.Format = MQFMT_ADMIN;
SET OutputRoot.MQMD.ReplyToQ = 'TEST';
SET OutputRoot.MQMD.MsgSeqNumber = 1;
CREATE NEXTSIBLING OF OutputRoot.MQMD DOMAIN 'MQADMIN' NAME 'MQPCF';
DECLARE refRequest REFERENCE TO OutputRoot.MQPCF;
SET refRequest.Type = MQCFT_COMMAND;
SET refRequest.StrucLength = MQCFH_STRUC_LENGTH;
SET refRequest.Version = MQCFH_CURRENT_VERSION;
SET refRequest.Command = MQCMD_SET_AUTH_REC;
SET refRequest.MsgSeqNumber = 1;
SET refRequest.Control = MQCFC_LAST;
-- for setmqaut
SET refRequest.Parameter[1] = MQCACF_AUTH_PROFILE_NAME;
SET refRequest.Parameter[1].* = 'MYQMGR';
SET refRequest.Parameter[2] = MQIACF_OBJECT_TYPE;
SET refRequest.Parameter[2].* = 'MQOT_Q_MGR';
SET refRequest.ParameterList[1] = MQIACF_AUTH_ADD_AUTHS;
SET refRequest.ParameterList[1].*[1] = 'MQAUTH_ALL_MQI';
SET refRequest.Parameter[3] = MQCACF_PRINCIPAL_ENTITY_NAMES;
SET refRequest.Parameter[3].* = 'testusr';
SET OutputRoot.BLOB.BLOB = asbitstream(OutputRoot.MQPCF CCSID 1208);
SET OutputRoot.MQPCF = null;
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