First of all, you don't need the linkage table at all. You are using EGL file i/o to do the MQ PUT (Add) and Get (get). So it only needs a resource association and not any linkage table info.
Next, I think the problem could be similar to a problem I had seen when people were trying to access a remote queue from the debugger. The problem was the client was not able to find the Queue Manager. Attached is a document with sample code where you set the
Code Samples:
External type for the MQEnvironment object
ExternalTypeMQEnvironment typeJavaObject
{JavaName = "MQEnvironment", PackageName = "com.ibm.mq"}
staticchannel string;
statichost string;
staticport int;
End
where these fields have the following meaning.
MQEnvironment.hostName
For client connections, set this to the name of the host that hosts the queue
manager. Since this host name is used for a TCP/IP connection to the
machine on which the queue manager is running, the value is not case
sensitive. For example:
MQEnvironment.host = "machinename.dmain.com" ;
_ MQEnvironment.channel
This is the name of the channel for client connections. The value of this field
is case sensitive. Typically it is the name of the Server Connection Channel
under the queue manager. It is a bidirectional link that enables MQI calls and
responses between the client and the queue manager.
For client connections, set it to be the name of the server connection channel
under the queue manager to which the application is attempting to connect.
For example:
MQEnvironment.channel = "JAVA.CLIENT.CHNL";
_ MQEnvironment.port
The port number is an optional field. By default the client would attempt to
connect to the queue manager on the port number 1414 of the host. Port
number 1414 is the port number used by MQSeries listeners by default. If the
port number is different from the default, you can specify the port number
using the MQEnvironment.port field. For example:
MQEnvironment.port = nnnn;
_ MQEnvironment.userId, MQEnvironment.password
The userId and password fields are blank by default. You can specify a user
ID and password by setting the values of the userId and password fields. For
example:
MQEnvironment.userId = "userXYZ" ;
MQEnvironment.password = "password" ;
Program/Function logic
This sets static fields so you do not have to instantiate MQEnvironment. You should be able to set the static fields and then make the MQ calls.
So declare the MQEnvironment external type,
//variable declaration
env MQEnvironment;
and then in the function,
env.port = 1414;
env.host = "machinename.dmain.com";
env.channel = "JAVA.CLIENT.CHNL";
//mq call
get mqRec