$ZSEARCH()

Examples of $ZSEARCH()

The $ZSEARCH function returns the full file-specification of a located RMS file. The $ZSEARCH function is analogous to the DCL Lexical function F$SEARCH. However, $ZSEARCH(), consistent with $ORDER(), always returns a null after returning the last file even when the function finds only one matching file, while the DCL lexical returns the sole file-specification every time.

The format for the $ZSEARCH function is:

    $ZSEARCH(expr[,intexpr])        
    

$ZSEARCH() provides a tool for verifying that a file-specification exists and for finding all files that match a specificationa file exists. For information to help determine the validity of a file-specification and about specifying directories and file extensions,file name, refer to the section on $ZPARSE().