FOPTNUM Function

Returns the number of information items that are available for an external file.

Category: External Files
See: FOPTNUM Function: Windows in SAS Companion for Windows
FOPTNUM Function: UNIX in SAS Companion for UNIX Environments
FOPTNUM Function: z/OS in SAS Companion for z/OS

Syntax

FOPTNUM(file-id)

Required Argument

file-id

is a numeric variable that specifies the identifier that was assigned when the file was opened, generally by the FOPEN function.

Details

Windows Specifics: The number, value, and type of information items that are available depend on the operating environment.

Comparisons

  • Use FOPTNAME to determine the names of the items that are available for a particular operating environment.
  • Use FINFO to retrieve the value of a particular information item.

Example

This example opens the external file with the fileref MYFILE and determines the number of system-dependent file information items available:
%let fid=%sysfunc(fopen(myfile));
%let infonum=%sysfunc(foptnum(&fid));