Version 6.3.12 for OpenVMS
 —  Operations  —

Natural Exit Codes

There are two types of Natural exit codes:


Special Considerations for Natural on OpenVMS

If Natural fails during startup or is terminated by the TERMINATE statement, you can query the exit code from within a DCL file. Natural does not return low return code values such as "12" (startup error "Parameter module not found"). Instead, Natural adds the value "268,435,456" to the Natural error code. If this value were not added, the image run-down handler would interpret the value "12" as a Natural internal access violation and a system access violation message would be printed.

Exception

If Natural is terminated by using the TERMINATE statement with value 0, Natural exits with exit code 1. This is because under OpenVMS the C runtime makes no difference between an exit (0) and an exit (1) statement. In both cases, 1 is returned.

You can retrieve this error code in a DCL command file by inquiring the status value $STATUS. The example below shows how to retrieve the Natural exit code.

Recommendation

The value of $STATUS does not explain whether this is a startup error or an error generated by the TERMINATE statement. For Natural, the exit codes 1 to 99 are reserved for the startup errors. For that reason, use exit codes 100 to 255 for TERMINATE, otherwise you cannot not clearly indicate the reason for the exit.

Example

$    SET NOON
$    NAT :== $NATBIN:NATURAL.EXE
$    DEFINE/USER NATINPUT  SYS$INPUT
$    DEFINE/USER NATOUTPUT SYS$OUTPUT
$
$    nat parm=unknown
$
$! Note:
$!   %X10000000 is hexadecimal and stands for the decimal number 268,435,456
$!
$    status_value = $STATUS .AND. .NOT. %X10000000
$
$    IF status_value .GE. 100
$    THEN
$      WRITE SYS$OUTPUT "NATURAL terminates by using TERMINATE statement"
$    ELSE 
$      IF status_value .EQ. 1
$      THEN
$        WRITE SYS$OUTPUT "NATURAL terminates successfully"
$      ELSE
$        WRITE SYS$OUTPUT "NATURAL terminates with startup error " + "''status_value'"
$      ENDIF
$    ENDIF
$
$    EXIT

Top of page

Natural Startup Errors

The following exit codes may occur when starting Natural.

2 Terminal Control String (TCS) capability specified in SAGtermcap or Environment Variable NATTCHARSET.
3 Failed to initialize character conversion table.
4 Error in character conversion file NATCONV.INI.
5 Unable to read database assignments from global configuration file NATCONF.CFG.
6 Unable to find FNAT(dbid,fnr) or FUSER(dbid,fnr). Check your configuration files.
7 Cannot initialize LFILE table.
8 Obsolete.
9 Obsolete.
10 Obsolete.
11 Obsolete.
12 Unable to read specified parameter file. Please verify the parameter file.
13 Unable to read parameter file NATPARM.
14 Storage manager initialization failed.
15 End of file (EOF) encountered while reading from STDIN.
16 Unable to open buffer pool; contact the Natural system administrator.
17 Unable to read buffer pool assignments from NATURAL.INI file.
18 Invalid FDIC assignment.
19 Invalid FNAT assignment.
20 Invalid FSEC assignment.
21 Invalid FUSER assignment.
22 Unable to load Natural login module.
23 Unable to allocate memory for local data. Reduce USIZE and/or SSIZE parameter.
24 Unable to load Natural display module.
25,26 Error loading shareable image or DLL.
27 Login cancelled. Natural terminates.
28 Security violation during start of Natural. Natural terminates.
29 Security violation during start of Natural. Login aborted due to too many login failures.
30 Natural system error message raised.
31 NAT0866 Your Natural nucleus is not a Natural Security nucleus.
32 Password check failed.
33 Lock manager cannot create/initialize semaphores.
34 No library is accessible or present in specified FNAT/FUSER. Check system file assignments and file attributes of FNAT and FUSER (directories and files).
35 Internal wfc i/o terminal driver error.
36 Internal XVT error.
38 Creation of runtime context failed.
39 Unable to find NATDIR and/or NATVERS environment variable. If you have set the NATDIR environment variable, please check that it does not contain invalid or whitespace characters! NATVERS should only contain the Natural version. The path must contain a valid drive ID.
40 Natural zmodem error.
41 Creation of TF table failed because there are entries with different database types from older parameter module. Check parameter module with Natural Configuration Utility.
42 Batch mode driver error.
43 Screen window size is too small.
44 Exit from SQL signal handler.
45 Unable to load add-on product.
46 Unable to access FNAT library SYSLIB. Insufficient privilege or file protection violation.
47 Unable to read PARM_PATH entry from NATURAL.INI file or directory is not accessible.
48 Unable to read CONFIG_NAME entry from NATURAL.INI file or file is not accessible.
49 Unable to read NATTCAP entry from NATURAL.INI file or file is not accessible.
50 Unable to read NATCONV entry from NATURAL.INI file or file is not accessible.
51 Unable to process TMP_PATH entry from NATURAL.INI file. Path 'path' not accessible.
52 Unable to read PROFILE_PATH entry from NATURAL.INI file or directory is not accessible.
53 Unable to open local configuration file NATURAL.INI.NATOSDEP
54 Unable to read NATCONF.CFG for .
55 Unable to read NATURAL.INI for NATEXTLIB.
56 Unable to read NATDIR entry in SAG.INI file.
57 Not used.
58 Unable to read NATINI entry in SAG.INI file.
59 Unrecognized option 'option' specified.
60 Not enough memory to initalize internal tables.
61 Batch error occurred, but processing continued due to CC=ON parameter.
62 More than one Natural session with active repository not allowed.
63 Natural session with active repository already running.
64 Failed to open FNAT's LIBDIR.SAG. Check presence and access protection.
65 The FNAT assigned to this Natural session is out of date.
72 This is an evaluation copy of Natural ... It is valid until...
73 The test period of this evaluation copy of Natural ... has expired. It was valid until...
77 Invalid FDDM assignment.
85 Natural runtime startup error during context initialization.
86 Invalid code page [ name ] specified.
87 Failure initializing signal handlers.
88 Conflicting buffer pool usage.

Top of page