Setting positions within files

You can use the following library functions to help you reposition within a regular file:
  • fseek()
  • fseek_unlocked()
  • fseeko()
  • fseeko_unlocked()
  • ftell()
  • ftell_unlocked()
  • ftello()
  • ftello_unlocked()
  • fgetpos()
  • fgetpos_unlocked()
  • fsetpos()
  • fsetpos_unlocked()
  • lseek()
  • rewind()
  • rewind_unlocked()
With large file support enabled for AMODE 31 C/C++ applications, you can use the following library functions for 64-bit offsets:
  • fseeko()
  • fseeko_unlocked()
  • ftello()
  • ftello_unlocked()
  • lseek()
For AMODE 64 C/C++ applications, large files are automatically supported in the LP64 programming model. All of the above functions (both lists) can be used with 64-bit offsets.

See z/OS XL C/C++ Runtime Library Reference for more information on these library functions.