call "CBL_LOCATE_FILE" using user-file-spec user-mode actual-file-spec exist-flag path-flag returning status-code
01 actual-file-spec 03 buffer-len cblt-x2-compx pic x(2) comp-x. 03 buffer pic x(n). pic x(n).
0 | Check whether the file exists in a library or as a separate disk file.
If user-file-spec includes an embedded environment variable, the file is searched for along each path specified in that variable. If the file is found, actual-file-spec on exit contains the file specification with the environment variable expanded to the successful path. Otherwise, actual-file-spec on exit contains the file specification with the environment variable expanded to the first path it contained. |
1 | If user-file-spec includes an environment variable, actual-file-spec on exit contains the file specification with the environment variable expanded to the first path it contained. The file is not searched for. |
2 | If user-file-spec includes an environment variable, actual-file-spec on exit contains the file specification with the environment variable expanded to the next path it contained. The file is not searched for. This option should only be used after a successful call with user-mode = 1 or 2. See path-flag below. |
Comments:
CBL_LOCATE_FILE is not stripe-aware. If you use this routine on a striped file, the routine locates the first stripe only. Therefore, use this routine on an individual stripe only and refer to the stripe by the stripe name.