kdelete -- Delete Current Record from Keyed File

SYNOPSIS

 #include <lcio.h>

 int kdelete(const void *key, FILE *f);
 

DESCRIPTION

The kdelete function deletes the current record from the keyed stream associated with the FILE object addressed by f. The key argument addresses the value of the key field for the record to be deleted. If the key of the current record does not match, the record is not deleted and an error is returned. If the key pointer is NULL, the current record is deleted, and the key is not checked for validity. After deletion of a record, the file is considered to be positioned to the next record in sequence.

RETURN VALUES

The kdelete function returns 0 if no error occurs, or a negative value in case of an error.

CAUTION

Records cannot be deleted from an ESDS, or from a path whose base cluster is an ESDS.

EXAMPLE

For an example using kdelete, see VSAM I/O Example .

RELATED FUNCTIONS

kinsert, kretrv

SEE ALSO


Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.