The IOCTL sets the attributes in medium auxiliary memory at a specific partition.

Following is the structure for STIOC_WRITE_ATTRIBURE IOCTL
struct write_attribute
  uchar write_cache;       /* [IN] WTC - Write-through cache */
  uchar partition_number;  /* [IN] the partition which the attribute is belonged to */
  uint parm_list_len;      /* [IN] parameter list length */
  uchar reserved[10];
  char data[MAX_ATTR_LEN];   /* [IN] write attributes data */
} ;
An example of the STIOC_WRITE_ATTRIBUTE command is
#include <sys/Atape.h>

int rc;
struct write_attribute wr_attr;

memset(&wr_attr,0,sizeof(struct write_attribute)); 

wr_attr.parm_list_len=0x11;[3]=0x0D;[4]=0x08;[6]=0x01;[8]=0x08;[9]='I';[10]='B';[11]='M';[12]=' ';[13]='T';[14]='E';[15]='S';[16]='T'; 

printf("Issuing a sample Write Attribute command ....\n\n"); 
rc=ioctl(fd, STIOC_WRITE_ATTRIBUTE, &wr_attr); 

if (rc)
 printf ("Write Attribute failed (rc %d)",rc); 
 printf ("Write Attribute Succeeds");