Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

File processing

&pagelevel(3)&pagelevel

When the C library functions are used with POSIX functionality, it is basically possible to access both POSIX or UFS files and BS2000 files. The compiler environment also provides explicit 64-bit functions and types in addition to the 32-bit functions and types. The 64-bit interface needs to be used to be able to process files > 2 GB. See also section “Scopeof the supported C library”

As of CRTE V11.1A30, additional functions for using 64-bit time stamps instead of 32-bit time stamps are provided.

In the following section, the file processing functions are classified into different groups, depending on whether they can process both POSIX and BS2000 files or only POSIX files. Functions that process only POSIX files set errno explicitly if a BS2000 file was specified instead of a POSIX file.

The initial classification into function groups is followed by a description of POSIX file processing and some special features of BS2000 file processing, which are discussed further below.

Functions for POSIX and BS2000 files

The C library functions listed in the following table can process both POSIX as well as BS2000 files.

btowc()

creat()

clearerr()

close()

creat()

fclose()

fcntl()

fdopen()

feof()

ferror()

fflush()

fgetc()

fgetwc()

fgetws()

fgetpos()

fgets()

fgetwc()

fgetws()

fileno()

fopen()

freopen()

fprintf()

fputc()

fputs()

fputwc()

fputws()

fread()

freopen()

fscanf()

fseek()

fsetpos()

fstat()

fstatvfs()

ftell()

ftruncate()

fwide()

fwprintf()

fwscanf()

fwrite()

getc()

getchar()

getdents()

getrlimit()

gets()

getw()

getwc()

getwchar()

iswalnum()

iswalpha()

iswcntrl()

iswctype()

iswdigit()

iswgraph()

iswlower()

iswprint()

iswpunct()

iswspace()

iswupper()

iswxdigit()

lockf()

lseek()

lstat()

mktemp()

mmap()

open()

perror()

printf()

putc()

putchar()

puts()

putw()

putwc()

putwchar()

read()

readdir()

remove()

rename()

rewind()

scanf()

setbuf()

setrlimit()

setvbuf()

stat()

statvfs()


tmpfile()

truncate()

ungetc()

ungetwc()

unlink()

vfprintf()

vfscanf()

vfwprintf()

vfwscanf()

vprintf()

vscanf()

vwprintf()

vwscanf()

wprintf()

wscanf()

write()





Functions that reject BS2000 files

The following functions process only POSIX files (see also the manual "POSIX Basics" [1]). All of these functions - except sync() - set errno to EINVAL if an attempt is made to access BS2000 files.

access()

chmod()

chown()

dup()

dup2()

faccessat()

fchmod()

fchmodat()

fchown()

fchownat()

fcntl()

fdopendir()

fpathconf()

fstatat()

fsync()

futimesat()

isatty()

link()

linkat()

mkdirat()

mkfifo()

mkfifoat()

mknod()

mknodat()

openat()

pathconf()

readlink()

readlinkat()

renameat()

symlink()

symlinkat()

sync() *)

sysfs()

tcdrain()

tcflow()

tcflush()

tcgetattr()

tcgetpgrp()

tcsendbreak()

tcsetattr()

tcsetpgrp()

tempnam() *)

unlinkat()

utime()

utimensat()




*)

sync() has no effect on BS2000 files.
tempnam() sets errno to EINVAL if PROGRAM-ENVIRONMENT is not set.

When standard I/O streams are used, these functions are subject to restrictions if the streams were associated with the BS2000 SYSFILE management files by the POSIX subsystem (see section “Streams”).

Functions that access only POSIX files

The functions in the following list will always access POSIX files, regardless of which functionality was selected (POSIX or BS2000), since they do not exist as BS2000 functions.

chdir()

chroot()

closedir()

ftw()

getcwd()

getpass()

mkdir()

opendir()

pclose()

pipe()

popen()

readdir()

rewinddir()

rmdir()

seekdir()

telldir()

ttyname()

umount()

umask()