![]() Chapter Contents |
![]() Previous |
![]() Next |
| FINDFILE |
| Language element: | function |
| Category: | general-purpose OpenVMS |
| OpenVMS specifics: | All aspects are host-specific |
| Syntax | |
| Details | |
| Example | |
| See Also |
Syntax |
| FINDFILE(file-specification,context) |
| Details |
The FINDFILE function searches all directories and subdirectories for file-specification and returns the first filename that matches the file specification given. Subsequent calls return other filenames that match the specification. For more information, see the description of the CALL FINDEND routine in CALL FINDEND.
| Example |
The following example uses the FINDFILE function:
context=0;
fn=findfile('myprog*.sas',context);
do while (fn ^= ' ');
put fn;
fn=findfile('myprog*.sas',context);
end;
This example searches the user's directories for a filename that matches MYPROG*.SAS; for example, if it finds a file
named
MYPROG12.SAS, then FN is set to
myprog12.sas.
| See Also |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.