STIOC_LOCATE

This IOCTL command causes the tape to be positioned at the specified block ID. The block ID used for the command must be obtained with the STIOC_READ_POSITION command.

An example of the STIOC_LOCATE command is
#include <sys/Atape.h>

  unsigned int current_blockid;

  /* read current tape position */
  if (ioctl(tapefd,STIOC_READ_POSITION,&current_blockid)<0)
    {
    printf("IOCTL failure. errno=%d"n,errno);
    exit(1);
    }

  /* restore current tape position */
  if (ioctl(tapefd,STIOC_LOCATE,current_blockid)<0)
    {
    printf("IOCTL failure. errno=%d"n,errno);
    exit(1);
    }