Delete a file: Difference between revisions

→‎{{header|COBOL}}: verified to work with newest GnuCOBOL
imported>Acediast
(→‎{{header|COBOL}}: put DELETE FILE first because that's standard statement)
imported>Acediast
(→‎{{header|COBOL}}: verified to work with newest GnuCOBOL)
Line 480:
COBOL 2023 added a dedicated <code>DELETE FILE</code> statement.
{{works with|Visual COBOL}}
{{works with|GnuCOBOL}}
<syntaxhighlight lang="cobol"> IDENTIFICATION DIVISION.
PROGRAM-ID. Delete-Files.
Line 505 ⟶ 506:
However, in some implementations we need to use unofficial extensions to delete files, or if we want to delete directories. The following are built-in subroutines originally created as part of some of the COBOL products created by Micro Focus.
{{works with|Visual COBOL}}
{{works with|OpenCOBOLGnuCOBOL}}
<syntaxhighlight lang="cobol"> IDENTIFICATION DIVISION.
PROGRAM-ID. Delete-Files.
Line 515 ⟶ 516:
CALL "CBL_DELETE_DIR" USING "/docs"
 
GOBACK.
 
END PROGRAM Delete-Files.</syntaxhighlight>
 
=={{header|Common Lisp}}==
Anonymous user