What is MSGCLASS parameter?
MSGCLASS is an optional keyword parameter.
Purpose to code MSGCLASS?
So, MSGCLASS is used to specify the format of the output. This means that MSGCLASS defines the output device to which the system messages and JCL related messages are written and printed.
OK, so MSGCLASS parameters send the record of job-related information (which is often called as Job Log) to the output class and job Log consists of either job statement or Procedure related statements or Job Control related statements.
The Syntax of MSGCLASS:
SYSOUT-CLASS will take either of these values –
- Any single character from a to z.
- or, Any single number from 0 to 9.
Here, in the above image, you can see that MSGCLASS has a value of ‘A’ (i.e. MSGCLASS=A which is denoted by the red box).
There are a few special MSGCLASS as below –
- MSGCLASS ‘A’ –
When we use MSGCLASS option A, the output will print on the printer depending upon the specified destination of Print.
- MSGCLASS ‘X’ –
If we use MSGCLASS X, it will scan the output first under a particular TSO user and then it will go for a print. If it does not release the output to print within 72 hours, then the system will automatically delete this output.
- MSGCLASS ‘Y’ –
If it does not release an output to print within one hour, it may delete.
So, based on your requirement you have to code the MSGCLASS. You can check with your system operator or your group admin or your system admin and based on your requirement, you can give your own MSGCLASS.