ISMDELETE Procedure

ISMDELETE deletes the specified record. The previous I/O operation must have been a successful READ if a serial delete is to be done. A serial DELETE removes the record previously read. A random DELETE removes the record specified by the primary key. ISMDELETE does not affect the current record pointer.

The ISMDELETE procedure requires the following parameters to return a DELETE result:

ISMDELETE (ISAMFILE, OPTION, RECORD)
  • ISAMFILE—The user's file.

  • OPTION—Specifies whether a serial or random delete is to be done.

    Value

    Meaning

    0

    Serial delete

    1

    Random delete

  • RECORD—The user's record area.

The DELETE result values are listed in the following table. The results with an asterisk (*) are returned by the GENERALSUPPORT procedure ISMDELETE. The other values are returned by KEYEDIO.

Field

Value

Result [26:10]

Mnemonic

Meaning

[0:1]

0

No errors

1

99

LASTIOMUSTBEREAD

The last I/O was not a read. A random I/O was attempted when the ACCESSMODE was SEQUENTIAL.

*[2:1]

1

0

NOERROR

OPTION was not a valid value. Bit 0 is also equal to 1.

[6:01]

1

Primary keys are not equal.

[9:1]

1

95

RECORDNOTFOUND

The record was not found. No record met the key conditions. Bit 0 will also equal 1.

98

KEYISINVALID

The key is invalid. The KEYFLAGF was 0 indicating a relative key, but the file was not a relative file. Bit 0 will also equal 1.