HCD ACTIVATE fails with the following message when attempting to delete a tape device:
REASON=0151,CAN NOT DELETE DEVICE nnnn DESCTEXT=DEVICE PINNED, ASID = xxxx MIM2098 DEVICE nnnn PINNED BY MIA. TASK=MIMTPATT
During initialization, MIA pins all devices that it is managing, then unpins the devices at shutdown. MIA also pins/unpins around many functions that update a UCB for a managed tape device.
The ACTIVATE process requires that a device to be deleted be unpinned. When MIA detects an ACTIVATE, it will unpin the devices it is managing. However, if a device that is managed by MIA had previously been involved in a DDR SWAP, then unpinning may not occur during ACTIVATE (unpinning will still occur at MIA shutdown or if MIA is instructed to no longer manage a device). The result is that the device deleting ACTIVATE fails with a description saying MIM2098 device pinned by MIA. This description was provided by MIA through the parameter list at the time that MIA invoked the pin service. The success or failure of an ACTIVATE is displayed in the 'IOS500I ACTIVATE RESULTS' message.
Release: MIM 12.1 and 12.5
Component: MIA, MIM
The circumvention for this problem is to instruct MIA to not manage any device which failed ACTIVATE processing, re-run ACTIVATE, then instruct MIA to once again manage each affected device. MIA can be instructed to dynamically manage or not manage a device by issuing the MIA RESYNCH command.
Here are the steps:
RESYNCH DEVCLASS=NONE,DEVLIST=MIMUNITSMIA will resynchronize and the un-commented devices will once again be managed by MIA. Proceed to Step 8.
RESYNCH DEVCLASS=TAPE,DEVLIST=NONEMIA will resynchronize and all devices defined with device class TAPE will be managed by MIA.
An alternative to the steps above is to shut down MIA long enough to execute the ACTIVATE and then restart MIA. The danger in shutting down MIA is that an integrity exposure will exist in which dual allocation of tape devices can occur. This option could only be used if you can guarantee that no tape device allocations will occur during the time that MIA is down. The LOCAL option of the MIA SHUTDOWN command should be used so that any devices that are currently allocated are not freed for use by other systems.
You may also want to review KB 49837 - Dynamically deleting tape devices from MIA's control