Summary -
In this topic, we described about the MSGLEVEL with detailed example.
In other words, it uses to control the listing of the Job output/job log for the specific job. MSGLEVEL used to control the volume of the messages from server as well.
MSLEVEL is an optional parameter. The MSGLEVEL parameter controls allocation messages and termination messages which are printed in the job's output listing.
MSGLEVEL used to request the system for the printing of below.
- JOB statement and all the comments.
- All JOB control statements in the input stream.
- In-stream and/or cataloged procedure.
- Job control statement messages.
- JES and operator JOB processing messages.
Syntax -
MSGLEVEL=([statements][,messages]) MSGLEVEL=(M1,M2)
Syntax with JOB card:
//JOB-NAME JOB (ACCT-INFO),’PROGR-NAME’, CLASS=class-name, // MSGCLASS=msg-class, MSGLEVEL (M1, M2), keyword-parameters
Statements/M1 | Specifies which job control statements to print in the statement images. M1 parameter can be used to control the statements. M1 parameter value range is from 0-2. M1 is optional value. If not specified, default value is system installation default. |
Parameter | Values | Description |
---|---|---|
M1 | 0 | JCL internal messages (JOB statement, all comments and JECL statements up to the first EXEC statement) |
M1 | 1 | All Messages (JCL statements, JES2 or JES3 control statements, the procedure statements and messages with the values assigned to symbolic parameters in the procedure statements.) |
M1 | 2 | JOB related messages (JCL statements and JES2 or JES3 control statements) |
Messages/M2 | Specifies which job control statements to print in the statement messages. M2 parameter is used to control the messages. M2 parameter value range is 0-1. M2 is optional value. If not specified, default value is system installation default. |
Parameter | Values | Description |
---|---|---|
M2 | 0 | Messages will be displayed only when JOB ended abnormally |
M2 | 1 | Messages will be displayed only when JOB ended either normally or abnormally |
MSGLEVEL Parameter | Description |
---|---|
MSGLEVEL (0, 0) | Only JCL Internal messages when JOB ended abnormally (unsuccessfully). |
MSGLEVEL (0, 1) | Only JCL Internal messages when JOB ended either normally or abnormally. |
MSGLEVEL (1, 0) | All messages when JOB ended abnormally (Unsuccessfully). |
MSGLEVEL (1, 1) | All messages when JOB ended either normally or abnormally. |
MSGLEVEL (2, 0) | Only JOB related messages when JOB ended abnormally (unsuccessfully). |
MSGLEVEL (2, 1) | Only JOB related messages when JOB ended either normally or abnormally. |
Example 1:
//MTHEXMP1 JOB (META007),'PAWAN Y', MSGLEVEL= (1, 1)
In the above example, the JOB statement requests the system to print all messages when JOB ended either normally or abnormally.
Example 2:
//MTHEXMP2 JOB (META007),'PAWAN Y', MSGLEVEL=0
In the above example, the JOB statement requests that the system to print JCL internal messages and Messages to use the installation default.
Example 3:
//MTHEXMP1 JOB (META007),'PAWAN Y', MSGLEVEL=(,0)
In the above example, the JOB statement requests the system to use the installation default for statements and the system is not to print messages unless the job abnormally terminates.