MSGCLASS Parameter

Note! MSGCLASS parameter can be coded only at the job level.
  • MSGCLASS parameter is used to specify the output device to where the system and JCL messages are routed (written and printed).
  • MSGCLASS is a keyword parameter and is optional.
  • MSGCLASS is useful to hold the job log messages (the JESMSGLG ddname in the SDSF spool has the job log information) after JOB execution is completed.

The job log consists below -

  • JOB statements.
  • All job control statements.
  • In-stream or cataloged procedure statements.
  • Job control statement messages.
  • JES and operator messages of the job.

Syntax -

msg-class-value Specifies the single character MSGCLASS value.
The MSGCLASS parameter value is a single character, and it allows alphabets (A to Z) and numbers (0 to 9). In total, 36 different values are allowed.

Default and overrides -

MSGCLASS has the default value 'A' in every installation and applies to the job if it is not coded.

Examples -

MSGCLASS parameter values definition (Assumption) -

Parameter value Description
A SPOOL (Default)
B Printer in Hyderabad
C Printer in London
..... .....
9 Printer in Chicago

Scenario1 - MSGCLASS parameter with value "C".


The JOB statement sends to the Printer in London for printing the job log.

Scenario2 - No MSGCLASS parameter.


The JOB statement has not passed the MSGCLASS parameter. In this case, the MSGCLASS defaults to the installation default value 'A'. i.e., it is the device from where the job was submitted (SPOOL).