Example of how to assign a DESTINATION to a jobs MSGCLASS data
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:
//JOBCARD...
/*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.