F$LOCATE() is a lexical function that locates a specified portion of a character string and returns as an integer the offset of the first character.
Substring is the portion of the string that needs to be located. String is the string where the substring should be located.
Find out the length of the filename by locating the dot character:
$ FILE_SPEC = "MYFILE.DAT;1" $ NAME_LENGTH = F$LOCATE(".",FILE_SPEC)
Find out if a user is disusered by analyzing the line that contains the user's account flags:
$ line = "Flags: PwdMix" $ if f$locate("DisUser",line) .nes. f$length(line) then write sys$output "Disusered"