COBOL runtime messages are written in the format:
date-and-time message-number [process-id thread-id] message-text program-information
date-and-time
The date and time are displayed in the format:
YYYY-MM-DD HH:MM:SS (Year-Month-Day Hour:Minute:Second)
The time is displayed in local time.
message-number
The message number is displayed in the format:
JMPnnnni-w
JMP: Prefix indicates a runtime system message.
nnnn: Message serial number.
i: Characters to indicate severity and response required.
I: Operator response is unnecessary.
A: Operator response is necessary.
w: Severity code.
The relationship between the severity code and return code is shown in table "Severity codes in execution-time messages".
Severity Code | Level | Meaning | Effect on Return Code |
---|---|---|---|
I (INFORMATION) | Transmitting message | Information detected by the runtime system. The program can be executed normally. | Not affected |
W (WARNING) | Warning error | The program can be | Not affected |
E (ERROR) | Recoverable error | There is an error, but processing is continued according to the appropriate assumption. | Affected(*1) |
U (UNRECOVERABLE) | Unrecoverable error | The abort function (SIGABRT signal) is issued to abort program. The core of the operation process is created in the current directory.. | Not affected (*2) |
*1 : If an E-level message output, a return code is set when the COBOL execution unit terminates. The E-level message return code is assumed to be 12. It is compared to the value in special register PROGRAM-STATUS, and the larger value is set as the return code.
*2 : The completion code will be that of the started process. The program terminates abnormally.
Process ID and Thread ID
The process ID and thread ID of the program in which an error is detected are indicated in the following format:
[PID:mmmmmmmm TID:nnnnnnnn]
mmmmmmmm: Process ID of the application in which an error is detected
nnnnnnnn: Thread ID of the application in which an error is detected
Message-text
Explains the error contents.
Program-information
Information about the program in which errors have been detected is added to the message. However, depending on the error, this information may not be added.
[Linux]
When the error is detected by the program definition:
PGM=external-program-name
When the error is detected by the method definition:
CLASS=class-name-in-which-method-is-defined
[Solaris][Linux64]
When the error is detected by the program definition:
PGM=external-program-name. LINE=[copy-qualification-value-]line-number
When the error is detected by the method definition:
CLASS=class-name-in-which-method-is-defined METHOD=method-name. LINE==[copy-qualification-value-]line-number