Previous Page | Next Page

Functions and CALL Routines under UNIX

FOPTNUM Function: UNIX



Returns the number of information items that are available for an external file.
Category: External Files
UNIX specifics: Information items available
See: FOPTNUM Function in SAS Language Reference: Dictionary

Syntax
Details
See Also

Syntax

FOPTNUM(file-id)

file-id

specifies the identifier that was assigned when the file was opened, generally by the FOPEN function.


Details

Under UNIX, five information items are available for all types of files:

If you concatenate filenames, then an additional information item is available: File List. If you are using pipe files, then the only information item available is PIPE Command.

The open-mode specified in the FOPEN function determines the value that FOPTNUM returns.

Open Mode FOPTNUM Value Information Items Available
Append

Input

Update

6 for concatenated files

5 for single files

All information items available.
Output 5 for concatenated files

4 for single files

Because the file is open for output, the File Size information type is unavailable.
Sequential

(using Pipe Device Type)

1 The only information item available is PIPE Command.

For an example of how to use the FOPTNUM function, see Example: File Attributes When Using the Pipe Device Type.


See Also

Previous Page | Next Page | Top of Page