Checks whether a file exists and returns details if it does.
call "CBL_CHECK_FILE_EXIST" using filename file-details returning status-code
Using call prototype (see Library Routines - Key) | Picture (32-bit systems) | |||||||
---|---|---|---|---|---|---|---|---|
filename | pic x(n). | |||||||
file-details | Group predefined as cblt-exit-params, containing: | Group containing: | ||||||
cblte-fe-filesize | cblt-x8-compx | pic x(8) comp-x. | ||||||
cblte-fe-filedate | Group containing: | Group containing: | ||||||
cblte-fe-day | cblt-x1-compx | pic x comp-x | ||||||
cblte-fe-month | cblt-x1-compx | pic x comp-x | ||||||
cblte-fe-year | cblt-x2-compx | pic x(2) comp-x | ||||||
cblte-fe-filetime | Group containing: | Group containing: | ||||||
cblte-fe-hours | cblt-x1-compx | pic x comp-x | ||||||
cblte-fe-minutes | cblt-x1-compx | pic x comp-x | ||||||
cblte-fe-seconds | cblt-x1-compx | pic x comp-x | ||||||
cblte-fe-hundredths | cblt-x1-compx | pic x comp-x | ||||||
status-code | See Library Routines - Key |
filename | The file to look for. The name can contain a path, and is terminated by a
space. If no path is given, the current directory is assumed.
This routine does not work with filenames containing wildcard characters. |
cblte-fe-filesize | The size of the file in bytes. |
cblte-fe-filedate | The date the file was created. |
cblte-fe-filetime | The time the file was created. |
CBL_CHECK_FILE_EXIST is not stripe-aware. If you use this routine on a file for which striping is enabled, the details returned refer to the first stripe only. Therefore, use this routine on an individual stripe only and refer to the stripe by the stripe name. For more information on the use of striped files, please refer to the section File Striping in the chapter File Handler Configuration of your File Handling book..
You can check the success of the call by examining RETURN-CODE. See the topic Interpreting the return code as a file status code for more details.