Functions and CALL Routines under OpenVMS |
Releases resources that are associated with a directory search.
Category: |
General-Purpose OpenVMS
|
OpenVMS specifics: |
All aspects are host-specific
|
-
context
-
is the same as the context variable that
is used by the FINDFILE function to maintain the search context between executions
of FINDFILE. The context argument must be initialized before FINDFILE is called.
Also, the value of context must not be manipulated before it is used in the
CALL FINDEND routine; if it is, channels and resources cannot be freed to
the process until the process terminates.
Like the LIB$FIND_FILE_END Run
Time Library Call, the CALL FINDEND routine releases resources that were associated
with a directory search. Use the CALL FINDEND routine with the FINDFILE function.
In the following example, FINDFILE is used to search
the user's directories for a filename that matches MYPROG*.SAS.
If it finds a file named MYPROG12.SAS,
for example, then FN is set to myprog12.sas
.
The CALL FINDEND routine is then called to terminate the directory search
and to release the associated resources.
context=0;
fn=findfile("myprog*.sas",context);
do while (fn ^= ' ');
put fn;
fn=findfile("myprog*.sas",context);
end;
call findend(context);
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.