Read Me - Common Public License V1.0 - Copyright Notice(©)


         +-(BOTH-| Write Options |--+  +-SHARED-----+
         +-(READ--------------------+  +-SHAREREAD--+
         +-(WRITE-| Write Options |-+  +-SHAREWRITE-+

   V                                   |
     +-NOBUFFER----------------------+    +-)-+

[Write Options:]

   V +-APPEND--+ |

Opens the stream and returns READY:. If the method is unsuccessful, it returns an error message string in the same form that the [description] method uses.

For most error conditions, the additional information is in the form of a numeric return code. This return code is the value of ERRNO, which is set whenever one of the file system primitives returns with a -1.

By default, [open] opens the stream for both reading and writing data, for example: 'open BOTH'. To specify that the stream be only opened for input or output, specify READ or WRITE.

The options for the [open] method are:


Opens the stream for input only.


Opens the stream for output only.


Opens the stream for both input and output. (This is the default.) The stream maintains separate read and write pointers.


Positions the write pointer at the end of the stream. (This is the default.) The write pointer cannot be moved anywhere within the extent of the file as it existed when the file was opened.


Sets the write pointer to the beginning of the stream and truncates the file. In other words, this option deletes all data that was in the stream when opened.


Enables another process to work with the stream in a shared mode. (This is the default.) This mode must be compatible with the shared mode (SHARED, SHAREREAD, or SHAREWRITE) used by the process that opened the stream.


Enables another process to read the stream in a shared mode.


Enables another process to write the stream in a shared mode.


Turns off buffering of the stream. All data written to the stream is flushed immediately to the operating system for writing. This option can have a severe impact on output performance. Use it only when data integrity is a concern, or to force interleaved output to a stream to appear in the exact order in which it was written.


Opens the stream in binary mode. This means that line-end characters are ignored; they are treated like any other byte of data. This is for processing binary record data using the line operations.


Specifying the BINARY option for a stream that does not exist but is opened for writing also requires the RECLENGTH option to be specified. Omitting the RECLENGTH option in this case raises an error condition.

RECLENGTH [length]

Allows the specification of an exact length for each line in a stream. This allows line operations on binary-mode streams to operate on individual fixed-length records. Without this option, line operations on binary-mode files operate on the entire file (for example, as if you specified the RECLENGTH option with a length equal to that of the file). The [length] must be 1 or greater.

Stream object - OPEN method


Read Me - Common Public License V1.0 - Copyright Notice(©)