ContentsIndexPreviousNext

C$DELETE Routine

C$DELETE deletes the indicated file.

Usage

CALL "C$DELETE"
    USING FILE-NAME, FILE-TYPE,
    GIVING STATUS

Parameters

FILE-NAME PIC X(n)

Contains the name of the file to be deleted. This should either be a full path name or a name relative to the current directory.

FILE-TYPE (optional) PIC X

Indicates the file type. If the FILE-TYPE parameter is supplied, it must be either "S", "R", or "I" indicating that the source file is a sequential, relative, or indexed file. This can be useful in cases where the original file is held in more than one physical disk file (for example, C-ISAM indexed files and Vision version 4 files are physically held in two separate files). If the FILE-TYPE parameter is omitted, then only the single physical file named in FILE-NAME is deleted.

STATUS PIC 9(n)

Returns "0" if successful, or "1" if not.


Note: The behavior of this library routine is affected by the setting of the FILENAME-SPACES configuration variable. See the documentation in Appendix H, Configuration File Entries, for information about the terminating character for path names.