[comp.os.vms] SYS$QIOW tape driver problems

ad@vms.macc.wisc.edu (Maccsys) (09/23/87)

I am writing a set of tape handling routines and use the SYS$QIOW
system service with the function parameters IO$_SKIPRECORD and
IO$_SKIPFILE.  The calls written in C take the form:

/* perform tape skipping */
int skip_cmd(skips)
short int	skips;
{
  int	status;

  status = sys$qiow(0,			/* efn */
	channel[LOGICAL_UNIT - 1],	/* io channel */
	IO$_SKIPRECORD,		/* function */
	&(iosb),		/* io status block */
	0,			/* astadr */
	0,			/* astprm */
	skips,			/* p1 -  # blocks */
	0,			/* buffer length */
	0,			/* p3 */
	0,			/* p4 */
	0,			/* p5 */
	0);			/* p6 */
}

IO$_SKIPFILE is substituted in the function position to skip file
marks.  Neither functions operate as the documentation suggests.

When the IO$_SKIPRECORD function is specified, the tape skips only
1 block in either direction.  According to the documentation, the
skip parameter (skips) indicates the number of skips (pos. values
cause forward motion, neg. values cause reverse motion) to take.
Nevertheless, the tape will only skip in one tape block in either
direction although the skip parameter can be proven to be a different
integer.

When the IO$_SKIPFILE function is specified and the skip parameter
is a large enough negative integer to cause the tape to return to
the beginning-of-tape, and incorrect number of end-of-file marks
is returned in the iosb structure!!!!

Does anyone know why this is happening or how to fix these problems?
Thanks in advance!!!

\\\\\\\\\\\\\\\\\\\\ Alan Dickman  608-262-9421 ////////////////////
\ Arpa: ad@vms.macc.wisc.edu                   Bitnet: ad@wiscmacc /
/          UUCP: ...{allegra,ihnp4,seismo}!uwvax!uwmacc!ad         \
//////////// 1210 West Dayton Street, Madison, WI 53706 \\\\\\\\\\\\