This routine checks whether a file exists or not.
Specification
01 file-name: PIC X(n). 01 file-details. 02 file-size PIC 9(18) BINARY. 02 file-date. 03 days PIC 9(4) BINARY. 03 months PIC 9(4) BINARY. 03 years PIC 9(4) BINARY. 02 file-time. 03 hours PIC 9(4) BINARY. 03 minutes PIC 9(4) BINARY. 03 seconds PIC 9(4) BINARY. 03 m-secs PIC 9(4) BINARY. 01 status-code: PIC S9(4) COMP-5.
CALL "CBL_CHECK_FILE_EXIST" USING file-name file-details RETURNING status-code.
Interface
Specifies the name of the file to be checked. If no path name is specified, the current directory is assumed. It must be terminated by a blank or null character. The maximum size of the file name is 255.
Specifies the area to store the size of the file.
Specifies the area to store the creation date of the file.
Specifies the area to store the creation time of the file.
Return code
The return code is set in the status-code specified in the RETURNING clause.
0: Successful
Other than 0: Failure