TACL Reference Manual
Built-In Functions and Variables
HP NonStop TACL Reference Manual—429513-018
9-13
#ABEND Built-In Function
text
is text, 0 to 80 characters, to be included in the process deletion message. Leading
and trailing spaces are ignored.
Result
•
If you do not specify the ERROR option, #ABEND returns -1 if it is successful, 0 if it
is not.
•
If you include the ERROR option , #ABEND returns the file-system error code
passed to it by the ABEND operating system procedure. In this case, zero
indicates no error.
•
If the #ABEND function terminates the TACL process from which it was issued,
#ABEND returns nothing.
Considerations
•
If the process cannot be terminated immediately, the ABEND operating system
procedure queues the request.
•
If you do not specify a process, #ABEND terminates the last process started by
TACL or the process for which TACL most recently paused, if that process is still
running. If there is no default process, you must include the process specification.
•
You can include the text argument only when a process specification is present.
•
COMPLETIONCODE, SUBSYS, TERMINATIONINFO, and text are ignored,
except when terminating your current TACL process (or, if it is a process pair,
either its primary or backup process). If you are abending your TACL, those items
you specify are included in the “abend” system message.
Examples
1. In this macro, TACL terminates $TMP2 after starting it:
?SECTION job^mgr ROUTINE
#FRAME
#PUSH errpm
== Start $TMP2
FUP /NOWAIT, NAME $TMP2/
== Now stop $TMP2:
#OUTPUT Error occurred, abending $TMP2...
#SET errpm [#ABEND /COMPLETIONCODE 20, ERROR/ $TMP2]
#OUTPUT Diagnostics: errpm = [errpm]
#UNFRAME
2. This routine produces this output after loading and invoking job^mgr:
14> job^mgr
Error occurred, abending $TMP2...
Diagnostics: errpm = 0