Process Help

DELETE - delete a Datamine file

 

Process Name

Menu Path

Link to Command Table

DELETE

Data ribbon | Data Tools | Tables | Delete

Click here

 

Introduction

Deletes the database file attached to &IN.

How to use

If the input file is a catalogue file then all files within the catalogue can be deleted, depending on the value of the optional parameter @CONFIRM. If the input is a catalogue file and @CONFIRM=0, the user is warned that operation is on catalogue file input and must confirm that deletion of all files in the catalogue is required, before this takes place. If the input is a catalogue file and @CONFIRM= 1, the user is again warned that operation is on catalogue file input, but in this case must confirm deletion of each file in the catalogue individually, before this takes place.

A catalogue file itself may be deleted by either overwriting it with another file before deletion; or by using the DMEDIT process to change the name of the field from 'FILENAM to anything else.

Files, Fields and Parameters

Input Files

Name

Description

I/O Status

Required

Type

IN

File to be deleted. If IN is a catalogue file, then all the files in the catalogue will be deleted if confirmed.

Input

Yes

Undefined

Output Files

Name

I/O Status

Required

Type

Description

Parameters

Name

Description

Required

Default

Range

Values

CONFIRM

 

Option

Description

1;

If IN is a catalogue file, then a request for confirmation will be issued for each file in the catalogue. If IN is a individual database file, then confirmation that the file is to be deleted is requested. Default: (0). >>> OPERATING ON A CATALOGUE FILE INPUT <<< >>> ARE YOU SURE YOU WISH TO DELETE ALL FILES <<< >>> PRESS <RETURN> TO CONTINUE (OR ! TO TERMINATE) >

No

0

0,1

0,1


Notes

For the native-file structure databases introduced with Version 3.0 of Studio 3, the message:

>>> nnnnnnnn RECORDS IN FILE filename
>>> FILE filename DELETED OK

appears on successful deletion. Deletion takes place by removing the directory entry for the database file(s) and deleting the external binary file(s). For the work-file structure databases, the message:

>>> nnnnnnnn RECORDS IN FILE filename
>>> FILE filename DELETED OK, nnnnn PAGES

appears on successful deletion. Deletion takes place by zeroing out all directory page records and by setting the file name in the directory to ****. Although deletion frees the database pages originally occupied by the file, it does not reduce the size of the system database file.


Example

!DELETE &IN(FILE)


Error and Warning Messages

Message

Description

Solution

>>> SECURITY VIOLATION ON FILE nnnnnnnn

If the file has been specified (SECURI process) to be No Access, (i.e. no read or write permitted), a message will be produced; the file will not be deleted.

 

 

 

 

>>> SECURITY VIOLATION - OUTPUT FILE WRITE PROTECTED <<<

The file is read only and the file will not be deleted. In either case use !SECURI to change the security access to read/write and then delete the file.