Using fseek() and ftell() in blocked files

For files opened with type=blocked, ftell() returns relative block numbers. The behavior of fseek() and ftell() is similar to that when you use relative byte offsets for binary files, except that the unit is a block rather than a byte. For example,
   fseek(fp,-2,SEEK_CUR);
seeks backward two blocks from the current position.
   fseek(fp,6,SEEK_SET);

seeks to relative block 6. You do not need to get an offset from ftell().

You cannot seek past the end or before the beginning of a file.

The first block of a file is relative block 0.

For AMODE 31 C/C++ applications repositioning within a large format sequential data set that need fseek() and ftell() to access positions beyond 2 GB - 1 block must use the large file version of fseeko() and ftello().