Previous Page | Next Page

Functions and CALL Routines under OpenVMS

FINFO Function: OpenVMS



Returns the value of an information item for an external file.
Category: External Files
OpenVMS specifics: Types of information items
See: FINFO Function in SAS Language Reference: Dictionary

Syntax
Details
Examples
Example 1: Example 1: Returning Information on a Single File
Example 2: Example 2: Returning Information on a Concatenation of Files
See Also

Syntax

FINFO(file-id,info-item)

file-id

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

info-item

specifies the name of the file information item to be retrieved. This is a character value.

Under OpenVMS, info-item can have the following values:

  • Filename

  • Owner Name

  • Group Name

  • Access Permission

  • File Size (bytes)

If you concatenate filenames, then an additional info-item is available: File List.


Details

The FINFO function returns the value of a system-dependent information item for an external file that was previously opened and assigned a file-id by the FOPEN function. FINFO returns a blank if the value given for info-item is invalid.


Examples


Example 1: Example 1: Returning Information on a Single File

The following example returns information on a single file named myfile.dat :

filename myfile "myfile.dat";

data;
   fid=fopen('myfile');
   fnum=foptnum(fid);

   do i = 1 to fnum;
      name=foptname(fid,i);
      info=finfo(fid,name);
      put name= info= ;
   end;
run;


Example 2: Example 2: Returning Information on a Concatenation of Files

The following example returns information on a concatenation of files named myfile1.dat and myfile2.dat :

filename myfile ("myfile1.dat" "myfile2.dat");

data;
   fid=fopen('myfile');
   fnum=foptnum(fid);

   do i = 1 to fnum;
      name=foptname(fid,i);
      info=finfo(fid,name);
      put name = info= ;
   end;
run;


See Also

Previous Page | Next Page | Top of Page