Submits a job to delete a file and its associated logical files and I/O module.
This is a Specialized Built-In Function for use in a Development Environment only.
Arguments for Visual LANSA
Arguments for LANSA for i
For further information, refer to Delete a file from the System described in Submitting the Job to Delete a File Definition in the LANSA for i User Guide.
A user wants to control the deletion of files and associated logical views and I/O module using their own version of the "Delete a file from the System" facility.
********* Define arguments and lists
DEFINE FIELD(#FILNAM) TYPE(*CHAR) LENGTH(10)
DEFINE FIELD(#LIBNAM) TYPE(*CHAR) LENGTH(10)
DEFINE FIELD(#RETCOD) TYPE(*CHAR) LENGTH(2)
********* Request File and library name
REQUEST FIELDS(#FILNAM #LIBNAM)
********* Execute built-in-function - DLT_FILE
USE BUILTIN(DLT_FILE) WITH_ARGS(#FILNAM #LIBNAM)
********* Check if submission was successful
IF COND('#RETCOD *EQ ''OK''')
MESSAGE MSGTXT('Delete of file submitted successfully')
CHANGE FIELD(#FILNAM) TO(*BLANK)
MESSAGE MSGTXT('Delete submit failed with errors,
refer to additional messages')