MSGLEVEL Parameter Example


Scenario1 - With two values.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP1 JOB (MTH123),'PAWAN Y',MSGLEVEL=(1,1)

Explaining Example -

In the above example: system prints all statements, its allocation and termination messages when JOB completed either normally or abnormally.

Scenario2 - Only the first value.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP2 JOB (MTH123),'PAWAN Y',MSGLEVEL=0

Explaining Example -

In the above example: system prints only JOB statements, its allocation and termination messages when JOB completed either normally or abnormally.

Scenario3 - Only second value.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP1 JOB (MTH123),'PAWAN Y',MSGLEVEL=(,0)

Explaining Example -

In the above example: system prints all statements, its allocation and termination messages when JOB completed abnormally.

Scenario4 - No MSGCLASS parameter.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP1 JOB (MTH123),'PAWAN Y',NOTIFY=&SYSUID

Explaining Example -

In the above example: the JOB statement has not passed the MSGLEVEL parameter. In this case, the MSGLEVEL defaults to the installation default value. i.e., MSGLEVEL=(1,1) in most of the cases.