COBOL Manual for TNS and TNS/R Programs

Libraries and Utility Routines
HP COBOL Manual for TNS and TNS/R Programs522555-006
13-113
DELETEASSIGN
message-number
identifies a specific saved ASSIGN message. message-number can be a
DISPLAY or COMPUTATIONAL numeric data item, a numeric literal, or an
expression enclosed in parentheses. The value must evaluate to a positive integer.
Example:
14 MESSAGE-NUMBER PIC S9999 COMPUTATIONAL.
Because each saved ASSIGN message is identified by a positive integer,
message-number refers to the integer value of the specific message. The set of
numbers associated with the saved ASSIGN messages are integers from 1 to N,
where N is normally the number of ASSIGN messages saved during the initial
process creation.
result
is a DISPLAY or COMPUTATIONAL numeric data item assigned the result
returned by DELETEASSIGN. Example:
02 RESULT PIC S9999 COMPUTATIONAL.
DELETEASSIGN operates on the saved ASSIGN messages. The program must have
included a SAVE directive to save the message.
Deleting the saved ASSIGN message has no effect on the current process. Any file
assignments are permanently established for a given process by the initialization code
that the process executes before the first statement of the COBOL program. Any
process initiated by the current process after the execution of the DELETEASSIGN
routine lacks the corresponding ASSIGN message.
DELETEASSIGN returns an integer value that indicates the outcome of this operation.
The integer values and their meanings are:
Value Meaning
0 The specified message or message portion is deleted.
-1 Failure due to a logic error; nothing is deleted. These are possible logic errors:
The portion identifier is not correct or does not identify a part of the ASSIGN
message that can be deleted.
The contents of the checkpoint list parameter are inconsistent.
-2 Insufficient checkpoint list space is available to complete the deletion. The
message is unchanged.