NAME

sseek - seek to a position in a SEPlib dataset


SYNOPSIS

        int sseek (tag,offset,whence)


INPUT PARAMETERS

char* - tag
      name of history file;
int - offset
      offset from whence given in machine types size for file i/o;
int - whence
      from where


RETURN VALUES

 -1 =  if fails
 x = current position if successful


DESCRIPTION

Moves file pointers inside a given SEPLIB dataset


COMMENTS

The tag argument is either the string ``in'',``out'', or any tag appropriate for use with auxin() or auxout(). This means either an explicit filename or a command line redirect parameter tag=filename.

sseek() sets the seek pointer associated with the open seplib dataset or device referred to by the tag according to the value supplied for whence. whence must be one of the following constants defined in <unistd.h>:

               SEEK_SET
               SEEK_CUR
               SEEK_END

If whence is SEEK_SET, the seek pointer is set to offset bytes. If whence is SEEK_CUR, the seek pointer is set to its current location plus offset. If whence is SEEK_END, the seek pointer is set to the size of the file plus offset.


SEE ALSO

seplib, the sreed manpage, the srite manpage, the auxclose manpage, the sseek_block manpage


DIAGNOSTICS

If an error occurs the return value will be -1. A diagnostic error should be printed.


KEYWORDS

seek position


LIBRARY

sep