DELETE PROCEDURE command

From m204wiki
(Redirected from DELETE command: Procedure)
Jump to navigation Jump to search

Summary

Privileges
Any user
Function
Deletes a procedure

Syntax

DELETE [[PROCEDURE] {procnumber | procname}]

Where:

procnumber is the number of an existing temporary procedure; it can be zero or a negative number.
procname is the name of an existing procedure.

If neither procnumber nor procname is specified, temporary procedure 0 is deleted.

Syntax notes

If procname includes Model 204 special characters, enclose it in single quotes:

DELETE [PROC] 'procname'

Example

DELETE ACCOUNT DELETE PROC -2 DELETE

Usage notes

The DELETE PROCEDURE command deletes procedures that you have defined.

  • Permanent procedure are stored by Model 204 until they are deleted or until the file in which they are stored is reinitialized.

  • Temporary procedures are saved in a system scratch file only during the current terminal session and are deleted when you log out.

When a procedure is deleted, Model 204 recovers the space it occupied in the procedure file. The procedure file is the file specified in the PROCEDURE command, or, if a file was not specified, the file that was open at the time the PROCEDURE command was issued.

The DELETE PROCEDURE command does not execute when multiple procedure files have been specified for a group. In this case, DELETE PROCEDURE must be used in a file context.

Note: Once the PROCEDURE command with an ALIAS option is issued, the alias is created. Deleting the procedure does not delete the alias. Only the DEASSIGN command removes the alias.

When it processes DELETE PROCEDURE, Model 204 ends any current User Language update unit and begins a non-backoutable update unit. If a Model 204 command non-backoutable update unit is in progress, DELETE PROCEDURE is included in that update unit. For more information about Model 204 update units, see Update units and transactions.