MSGLEVEL Parameter
MSGLEVEL Parameter
Note! MSGLEVEL parameter can be coded only at the job level.
MSGLEVEL parameter controls the printing of job messages in the output listing or job log (i.e., in the SPOOL by default). MSLEVEL is a keyword parameter and is optional.
MSGLEVEL parameter requests the system for the printing of below -
- The JOB card and comments up to the first EXEC statement.
- All JCL statements and JES2/JES3 statements.
- In-stream or cataloged procedure.
- Job control statement messages.
- JES and operator JOB processing messages.
Syntax -
MSGLEVEL=([statements][,execution-status])
or
MSGLEVEL=(M1,M2)
statements/M1 | Specifies what JCL statements/messages to print in the output listing. It also represents as M1, with valid values from 0 to 2. M1 is optional. If not specified, the system installation default value is applied.
| ||||||||
execution-status/M2 | Specifies when to print the job related messages in the spool. It is also represented as M2 with a valid value of 0-1. M2 is optional. If not specified, the system installation default value is applied.
|
Possible Combinations -
MSGLEVEL Parameter | Description |
---|---|
MSGLEVEL=(0,0) | Only JOB Statements, its allocation and termination messages when JOB ended abnormally (unsuccessfully). |
MSGLEVEL=(0,1) | Only JOB Statements, its allocation and termination messages when JOB ended either normally or abnormally. |
MSGLEVEL=(1,0) | All Statements, its allocation and termination messages when JOB ended abnormally (Unsuccessfully). |
MSGLEVEL=(1,1) | All Statements, its allocation and termination messages when JOB ended either normally or abnormally. System Default. |
MSGLEVEL=(2,0) | Only JCL statements, its allocation and termination messages when JOB ended abnormally (unsuccessfully). |
MSGLEVEL=(2,1) | Only JCL statements, its allocation and termination messages when JOB ended either normally or abnormally. |
Note: If the first parameter is alone coded, we can ignore the parentheses ().
Examples -
Scenario - With two values.
//MTHEXMP1 JOB (MTH123),'PAWAN Y',MSGLEVEL=(1,1)
System prints all statements, its allocation and termination messages when JOB completed either normally or abnormally.