Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

__ns_fopen64_special(3) Guardian Native C Library Calls Ref
erence Manual
If a device does not support the sync-id mechanism and a sync_depth value is specied, a value
of 1 (one) is used for sync_depth.
If you include a system name in the lename, you must precede the system name with two
backslashes instead of one because backslash is an escape character in C. For example, to open
the le \SYS.$VOL.SVOL.FILE, you would use the C string: "\\SYS.$VOL.SVOL.FILE"
.
If the le does not already exist and you include "b" in the access string,
__ns_fopen64_special()
creates a C binary le. Otherwise, __ns_fopen64_special()
creates an
Edit le.
If the le exists and you include "b" in the access string, __ns_fopen64_special()
opens the le
as a C binary le. Otherwise, __ns_fopen64_special()
opens the le as a text le.
The default number of secondary extents for les created by __ns_fopen64_special()
is 16. The
default number of maxextents for les created by __ns_fopen64_special( )
is 500.
For complete details on active backup programming in C, see the Guardian Programmers
Guide.
Access Mode Values
The possible values of the string access_mode are:
r Open an existing text le for read-only access.
w Create a text le (or truncate an existing text le to length zero) and open it for
write-only access.
a Create a text le (or open an existing text le) and open it for append (write at
the end of the le) access.
r+ Open an existing text le for update access (reading and writing).
w+ Create a text le (or truncate an existing text le to length zero) and open it for
update access.
a+ Create a text le (or open an existing text le) and open it for update access with
writing at the end of the le.
rb Open an existing binary le for read-only access.
wb Create a binary le (or truncate an existing binary le to length zero) and open it
for write-only access.
ab Create a binary le (or open an existing binary le) and open it for append (write
at the end of the le) access.
rb+ Open an existing binary le for update access (reading and writing).
wb+ Create a binary le (or truncate an existing binary le to length zero) and open it
for update access.
ab+ Create a binary le (or open an existing binary le) and open it for update access
with writing at the end of the le.
If you attempt to open a le in read mode and the le does not exist or cannot be read,
__ns_fopen64_special() fails, returning the pointer value NULL.
When you open a le in append mode, the le-position indicator is set to the end of the le
before each write operation, regardless of previous positioning.
The ANSISTREAMS pragma determines whether a text le is type 180 (C binary le) or type
101 (edit le). For details, see the C/C++ Programmers Guide.
516 Hewlett-Packard Company 527192-007