Associating scheduling environments with incoming work

Having defined scheduling environments to WLM, and having set the resource states on the individual systems, all you need now is a way to associate the scheduling environment name with actual work.

The SCHENV parameter on the JES2 or JES3 JCL JOB statement associates the job with the scheduling environment as shown in the following JCL example:
//SHAMIL   JOB (C003,6363),'Steve Hamilton',
//             MSGLEVEL=(1,1),
//             REGION=4096K,
//             CLASS=A,
//             SCHENV=DB2LATE,
//             MSGCLASS=O
   ...

This specification associates this batch job with the DB2LATE scheduling environment. It can be coded by the end user, or automatically supplied by installation-provided exits.

If the scheduling environment name specified is not defined in the active WLM policy, the job will fail with a JCL error during conversion, accompanied by an appropriate error message.

Existing JES2 or JES3 exits can be used to change the scheduling environment name associated with batch jobs. This can be done during JCL conversion. These exits can also be used to dynamically generate scheduling environment associations as work is submitted. This could be useful in migrating from another scheduling mechanism to scheduling environments. See z/OS JES2 Installation Exits or z/OS JES3 Customization for more information.