Previous Page | Next Page

Functions and CALL Routines under OpenVMS

CALL FINDEND Routine: OpenVMS



Releases resources that are associated with a directory search.
Category: General-Purpose OpenVMS
OpenVMS specifics: All aspects are host-specific

Syntax
Details
Example
See Also

Syntax

CALL FINDEND(context);

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.


Details

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.


Example

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);


See Also

Previous Page | Next Page | Top of Page