Chapter Contents

Previous

Next
FOPTNAME

FOPTNAME



Returns the name of an item of information for a file

Category: External File


Syntax
Details
Example
See Also

Syntax

item-name=FOPTNAME(file-id,item-num);

item-name
contains the name of the information item, or a blank if an error occurred.

Type: Character

file-id
contains the identifier that was assigned when the file was opened. If file-id is invalid, the program halts.

Type: Numeric

item-num
is the number of the information item.

Type: Numeric


Details

The number, value, and type of available information items depend on the operating system.


Example

Retrieve the system-dependent file information items and write them to the log:

length name $ 8;
rc=filename('myfile',fname);
fid=fopen('myfile');
infonum=foptnum(fid);
do j=1 to infonum;
  name=foptname(fid,j);
  value=finfo(fid,name);
  put 'File attribute' name 'has a value of' value;
end;
rc=fclose(fid);
rc=filename('myfile','');
The example produces the following output:
File attribute LRECL has a value of 256.

See Also

DINFO

DOPTNAME

DOPTNUM

FINFO

FOPEN

FOPTNUM

MOPEN


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.