As has been previously stated it is strongly recommended you ensure a connection is not being used when a connection definition is updated. The flags are used to determine which parts of the information in the connection definition are to be updated. So, even if a value is provided in the structure, if the correct flag is not set that value will not be used:
MQeConnectionDefinitionParms parms = CONNDEF_INIT_VAL;
We will create a new description:
rc = OSAMQESTRING_NEW(&error, "replacement description", SB_STR, &parms.hDescription);
If we set the opFlags field as follows the description will not be updated, instead the administration function will attempt to update the value for the name of the via queue manager:
parms.opFlags = CONNDEF_VIAQM_OP;
We need to set the opFlags field as follows in order to obtain the desired behavior:
Parms.opFlags = CONNDEF_DESC_OP;
The function to update the connection definition is then called as follows:
rc = mqeAdministration_Connection_update(hAdministrator , &error, hQueueMgrName, &parms);
A connection may be deleted as follows. If the connection doesn't exist then the return code of MQERETURN_COMMS_MANAGER_WARNING will be given with the reason code of MQEREASON_CONDEF_DOES_NOT_EXIST.
rc = mqeAdministrator_Connection_delete(hAdministrator, &error, hQueueMgrName);