Products Downloads


French version


 


ADELIA

VADELIA

SADELIA

WADELIA

EADELIA

(I/B)

(I/B) (S)

(B) (S)

(I/B) (S)

(B) (S)


Section for use

All


Syntax

DELETE ViewName Parameter


Parameter

*NO_MR | *MR | None


Description

This instruction deletes the record of the file which corresponds to the view ViewName. The record must have been read previously and be available.


The *MR parameter allows you to generate deletion implicit management rules that are linked to the entity corresponding to the view, even if the program is generated without the option to generate implicit management rules.


The *NO_MR parameter allows you not to generate deletion implicit management rules that are linked to the entity corresponding to the view, even if the program is generated with the option to generate implicit management rules.


The *LOCKED reserved word is updated by the instruction


• If *LOCKED = 1 One record has been locked.

• If *LOCKED = 0 No records have been locked.


If you encounter a locked record, the instruction's execution is stopped.


Example

BEGIN_PROCEDURE SBRDEL

* delete subroutine

RETURN_CODE = *BLANK

CHAIN ORDERS

IF   ORDERS EXISTS

IF   *LOCKED = '0'

* everything O.K.

DELETE ORDERS

ELSE

* record is locked

RETURN_CODE = 'LOCK'

END

ELSE

* record is not found

RETURN_CODE = 'NFND'

END

*

END_PROCEDURE


↑ Top of page

  • Aucune étiquette