The MSGCLASS parameter in JCL specifies the output class for job log messages, including JCL statements, allocation messages, JOB and step termination messages, and system messages. It determines where job output is directed and how it is handled by the system.
1//jobname JOB (accounting-information),programmer-name,MSGCLASS=class
1//PAYROLL JOB (ACCT123),'JOHN SMITH',MSGCLASS=A
Routes the job output to output class A
12//REPORT JOB (ACCT456),'JANE DOE', // CLASS=B,MSGCLASS=X,NOTIFY=USER01
Routes job messages to MSGCLASS X while running the job in CLASS B
12//STEP1 EXEC PGM=IEBGENER //SYSOUT DD SYSOUT=*
SYSOUT=* uses the MSGCLASS value for SYSOUT data set output class
1//TSOJOB JOB (ACCT789),'TSO USER',MSGCLASS=H,NOTIFY=&SYSUID
Uses MSGCLASS H (typically for TSO viewing) and notifies the submitter when job completes
While these can vary by installation, common MSGCLASS assignments include:
MSGCLASS | Typical Usage |
---|---|
A | Printed output (routed to printer) |
H | Held for TSO viewing (SDSF, IOF, etc.) |
X | Held for TSO viewing, purged after certain time |
Z | Held in spool, not automatically printed |
J | JES internal reader (for submitting jobs) |
0 | Often used for SYSOUT purge (no output) |
MSGCLASS interacts with JES (Job Entry Subsystem) output processing: