Description of the MSG statements


MSG statements allow JCL scripts to write information, warning, or error messages to an output file with the ddname BMCPRINT.

These messages serve information or diagnostic purposes.

The MSG INFO statement is useful for reporting status information. The MSG INFO statement does not affect the script completion return code or processing sequence.

The MSG WARN statement also writes a message, but maximum return code for the JCL script is increased to 04. The JCL script continues processing.

The MSG ERROR statement writes an error message, sets the JCL script return code to 08, and immediately stops script processing.

The following table lists JCL script completion codes.

Completion code

Description

00

Processing completed successfully.

04

Processing completed successfully; however, a MSG WARN message was issued.

08

Processing terminated prematurely because of a MSG ERROR statement.

12

Processing terminated abnormally because of a script error that was detected by the script language interpreter; an error message indicates the cause of the failure.

The message text string can be literals, variables, or concatenations of both. The maximum message text length is 255 bytes. If the resolved value of the message text exceeds 255 bytes, truncation occurs.

Related topic


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*