Previous Page | Next Page

Functions and CALL Routines under UNIX

MOPEN Function: UNIX



Opens a file by directory ID and member name, and returns either the file identifier or a 0.
Category: External Files
UNIX specifics: OPEN modes
See: MOPEN Function in SAS Language Reference: Dictionary

Syntax
Details

Syntax

MOPEN(directory-id,member-name<,open-mode<,record-length<,record-format>>>)

Note:   This version is a simplified version of the MOPEN function syntax. For the complete syntax and its explanation, see the MOPEN function in SAS Language Reference: Dictionary.  [cautionend]

open-mode

specifies the type of access to the file:

A

APPEND mode allows writing new records after the current end of the file.

I

INPUT mode allows reading only (default).

O

OUTPUT mode defaults to the OPEN mode specified in the host option in the FILENAME statement or function. If no host option is specified, it allows writing new records at the beginning of the file.

S

Sequential input mode is used for pipes and other sequential devices such as hardware ports.

U

UPDATE mode allows both reading and writing.

W

Sequential update mode is used for pipes and other sequential devices such as ports.


Details

MOPEN returns the identifier for the file, or 0 if the file could not be opened.

Previous Page | Next Page | Top of Page