Hi,
I am trying to connect to an MQ from as sas data step program.
I have found this example code
data _null_;
length hconn hobj cc reason 8;
length rc hod hpmo hmd hmap hdata 8;
length parms $ 200 options $ 200 action $ 3 msg $ 200;
hconn=0;
hobj=0;
hod=0;
hpmo=0;
hmd=0;
hmap=0;
hdata=0;
cc=0;
put '---------------- Connect to QMgr --------------';
qmgr="MQS1";
call mqconn(qmgr, hconn, cc, reason);
if cc ^= 0 then do;
if reason = 2002 then do;
put 'Already connected to QMgr ' qmgr;
end;
else do;
if reason = 2059 then
put 'MQCONN: QMgr not available...
needs to be started';
else
put 'MQCONN: failed with reason= ' reason;
goto exit;
end;
end;
else put 'MQCONN: successfully connected to QMgr ' qmgr;
exit:
run;I am running this code in SAS 9.2 from SAS-EG 4.3 connected to a metadata server just to very that i can connect to our MQ
I am wondering how i should specify hostname, port to the remote Queue just to very the connection. Do i need to have some
module installed to dfo this. ?
This code returns -1 in reason.
1.The software needed for CORBA/MSMQ/MQSeries communications is SAS Integration Technologies.
Since you use EG, your server has this component licenced.
2. Did you read these pages?
Usage Note 15291: MQCONN: failed with reason= -1 when using the SAS Interface to WebSphere MQ
1.The software needed for CORBA/MSMQ/MQSeries communications is SAS Integration Technologies.
Since you use EG, your server has this component licenced.
2. Did you read these pages?
Usage Note 15291: MQCONN: failed with reason= -1 when using the SAS Interface to WebSphere MQ
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.