VMTAPE Q TAPES command showed that tape drive nnnn was assigned to user id USER05 at real tape drive address E641, virtual address 0494. However, a query of address E641 showed the tape drive free. I issued a VMTAPE CANCEL 0494 USER05 and VMTAPE abended with an IOS002 abend.
Can you explain what steps should have been taken if not the VMTAPE CANCEL command.
In this scenario, when/after you issue the CANCEL command, as part of the CANCEL processing VMTAPE should DETACH the real tape device from itself. You shouldn't need to clean up after the CANCEL.