For locate mode processing. Use the LOCATE statement only with an OUTPUT SEQUENTIAL BUFFERED file to allocate storage within an output buffer for a based variable and to set a pointer to the location of the next record.
LOCATE based-var FILE (file-ref) SET (pointer-ref) KEYFROM (expression)