.......PS. [ZBX-8882] fixed message logging on DB2 errors
A......... [ZBX-8448] moved host and template linkage permission check outside low level function link() and added host and template linkage checks on template.massRemove