NetBatch Manual

Job Planning, Submission, and Management
NetBatch Manual522460-004
4-8
Using Completion Codes to Test Process
Termination Status
Table 4-3 lists and describes the standard completion codes used by NonStop system
language compilers and other HP products. For more information about the codes, see
the Guardian Procedure Calls Reference Manual.
Testing Completion Codes
The TACL #CASE and #IF built-in functions enable you to determine why a process of
a TACL job stopped. By including the functions in the job’s input file, you can test
completion codes and either return text or branch to other code. For more information
on the functions, see the TACL Reference Manual. For information on how the TACL
program handles completion codes, see the TACL Programming Guide.
Figure 4-5 on page 4-9 shows sample #CASE and #IF constructs that test completion
codes.
Table 4-3. Completion Codes
Code Description
-3 The process terminated itself but passed bad parameters to the ABEND, STOP, or
PROCESS_DELETE_ system procedure.
-2 The process terminated itself, but the operating system could not pass completion
code and termination information because of a resource problem.
-1 Trap detected.
0 Normal, voluntary termination with no errors.
1 Normal, voluntary termination with warning diagnostics.
2 Abnormal, voluntary termination with fatal errors or diagnostics.
3 Abnormal, voluntary, but premature termination with fatal errors or diagnostics.
4 The process did not start.
5 The process called the ABEND or PROCESS_STOP_ system procedure on itself.
6 An external, authorized process called the ABEND, STOP, or PROCESS_STOP_
system procedure to delete the process.
7 The process sent a restart request to the NetBatch scheduler.
8 Same as for completion code 1, but you must examine the process’s output file to
determine whether the results are acceptable.