How do I assign MSGCLASS a destination?

Document ID : KB000031677
Last Modified Date : 14/02/2018
Show Technical Document Details

 To add a destination to a job's MSGCLASS output (JESMSGLG, JESJCL,and JESYSMSG ) you need to use either a ROUTE PRINT or a FORMAT statement depending on whether you are using JES2 or JES3.

The two examples below show how to add a destination of MSG7 to MSGCLASS output.

If using JES2, to specify a destination for MSGCLASS you use a Route Print statement: 

/*ROUTE PRINT MSG7

 

If using JES3, you need to use a Format statement: 

/*FORMAT PR,DDNAME=,DEST=MSG7  

 

Adding the Route Print or Format statement will also attach a destination to any output using 'DD *'

For instance, in this IEBGENER for a JES 2 site:

 //JOBNAME JOB (115100000),JOHN,CLASS=A,MSGCLASS=X,
 //         NOTIFY=JOHN

 /*ROUTE PRINT MSG7
 //IEBGENER EXEC PGM=IEBGENER
 //OUT1   OUTPUT  CLASS=B,DEST=DIST2,OUTDISP=(KEEP,KEEP)
 //SYSPRINT DD  SYSOUT=*
 //SYSOUT   DD  SYSOUT=A

After running this JCL the JESMSGLG, JESJCL, and JESYSMSG will go to JES as class=X and have a destination of MSG7.

Additionally, since the SYSPRINT DD statement specifies SYSOUT=*,  it will also go to JES as a class=X and have a destination of MSG7.