I had to do some ejects awhile ago and the command line I have writen down is this 'vmchange -api_eject -map 0,0,1 -w -res -ml 00001:00005 -rn 0 -rt acs -rh dl1-d6.
If you type vmchange it will explain what most of the above means. However I do remember it was a pain if the tapes were not in a strict order. Tapes in order would be ejected but you would have to remove them from the cap before it would move the next tapes. So the effect would be 1,2,3 empty cap, 6 empty cap, 9,10,11 empty cap.
This is of course UNIX.