MainframeMaster

JCL Tutorial

JES3 Commands

Progress0 of 0 lessons

What is JES3?

JES3 (Job Entry Subsystem 3) is a component of the z/OS operating system that manages the flow of jobs and output in a mainframe environment. Unlike JES2, which operates primarily at the individual system level, JES3 provides more centralized control across multiple systems, with a global processor and local processors.

JES3 includes advanced features such as workload balancing, global resource control, and dependent job control. While IBM has announced that JES3 will eventually be discontinued, many organizations still rely on it, and a compatible replacement called JES3plus is available from Phoenix Software International.

JES3 vs JES2: Key Differences

FeatureJES3JES2
Command PrefixAsterisk (*)Dollar sign ($)
ArchitectureGlobal/Local processorsIndependent systems with shared spool
Resource ControlCentralized global controlMore distributed control
Job SelectionMain Device SchedulingInitiator-based selection
Command StructureVerb-noun syntax (*I J)Verb-operand syntax ($D J)

JES3 Command Format

JES3 commands begin with an asterisk (*) and typically follow a verb-noun structure. The basic format is:

text
1
*verb [destination] noun,parameters

For example, to display job number 123: *I J 123

The destination field is required only when issuing commands to remote processors. By default, commands are processed on the global processor.

Essential JES3 Commands

CommandDescriptionExample
*I JDisplay job information*I J 123 - Display info for job 123
*C JCancel a job*C J=123 - Cancel job 123
*F JModify job attributes*F J 123,H - Hold job 123
*F JRelease a held job*F J 123,R - Release job 123
*I UDisplay output information*I U J=123 - Display output for job 123
*F UModify output attributes*F U J=123,COPIES=2 - Change copies to 2
*I SDisplay job scheduler status*I S - Display scheduler status
*I ADisplay active jobs*I A - Display all active jobs

JES3 Command Categories

1. Job Control Commands

Commands for managing individual jobs:

Display Jobs with Various Criteria

text
1
2
3
4
5
*I J /* Display summary of all jobs */ *I J 123 /* Display information for job 123 */ *I J PAYROLL /* Display information for all jobs named PAYROLL */ *I J ALL,HOLD /* Display all jobs in hold status */ *I J ALL,ACTIVE=SYS1 /* Display all jobs active on system SYS1 */

Cancel Jobs

text
1
2
3
4
*C J=123 /* Cancel job 123 */ *C J=PAYROLL /* Cancel all jobs named PAYROLL */ *C J=PAYROLL,CI /* Cancel and produce a dump */ *C J=123,DUMP /* Cancel and produce a dump (alternative syntax) */

Modify Job Attributes

text
1
2
3
4
5
*F J 123,H /* Hold job 123 */ *F J 123,R /* Release job 123 */ *F J 123,P=7 /* Change job priority to 7 */ *F J 123,CLASS=A /* Change job class to A */ *F J 123,SCHED=MAIN1 /* Change system affinity */

2. Output Management Commands

Commands for managing job output:

text
1
2
3
4
5
6
7
8
9
*I U /* Display all output */ *I U J=123 /* Display output for job 123 */ *I U D=N1,T=PRT1 /* Display output for destination N1 on printer PRT1 */ *F U J=123,COPIES=3 /* Change number of copies for job 123 */ *F U J=123,DEST=N2 /* Change destination for job 123 */ *F U J=123,H /* Hold output for job 123 */ *F U J=123,R /* Release held output for job 123 */ *F U J=123,FORMS=SPEC /* Change forms to SPEC for job 123 */ *C U J=123 /* Cancel output for job 123 */

3. Device and System Control Commands

Commands for managing devices and controlling the system:

text
1
2
3
4
5
6
7
8
9
10
*X devname /* Start a device */ *V devname,ONLINE /* Vary a device online */ *V devname,OFFLINE /* Vary a device offline */ *I D D=devname /* Display device status */ *I D T=devtype /* Display status of devices of type devtype */ *I S /* Display scheduler status */ *F S,INT=interval /* Change scheduling interval */ *I A /* Display active jobs */ *I P /* Display processors */ *I GMS /* Display resource allocation */

4. Initiator Commands

Commands for managing job initiators:

text
1
2
3
4
5
6
*I G initname /* Display group initiator status */ *F G initname,ON /* Start initiator */ *F G initname,OFF /* Stop initiator */ *F G initname,PG=n /* Change group priority */ *F G initname,BAR /* Set job selection barrier */ *F G initname,NOBAR /* Remove job selection barrier */

5. JES3 Control Commands

Commands for controlling JES3 itself:

text
1
2
3
4
5
6
7
8
*CALL JES3 /* Start JES3 */ *START /* Alternative to start JES3 */ *RETURN /* Stop JES3 (orderly) */ *CANCEL /* Stop JES3 (immediately) */ *X JES3CHECK /* Run JES3 spool integrity check */ *F Q,H /* Hold all jobs on input queue */ *F Q,R /* Release all jobs on input queue */ *I Q /* Display queues */

Command Modifiers and Parameters

JES3 commands support various modifiers and parameters to refine their function:

ParameterDescriptionExample
HHold a job or output*F J 123,H
RRelease a job or output*F J 123,R
P=nSet priority (0-15)*F J 123,P=9
CLASS=cSet job class*F J 123,CLASS=A
SCHED=mainSet system (main) for execution*F J 123,SCHED=MAIN1
COPIES=nSet number of copies*F U J=123,COPIES=3
DEST=destSet output destination*F U J=123,DEST=REMOTE5
FORMS=formSet output form*F U J=123,FORMS=STD

JES3 Dependent Job Control (DJC)

One of JES3's unique features is Dependent Job Control (DJC), which allows for sophisticated job dependencies:

text
1
2
3
4
5
6
7
8
9
10
11
/* Display a DJC network */ *I N netname /* Hold a DJC network */ *F N netname,H /* Release a DJC network */ *F N netname,R /* Cancel a DJC network */ *C N netname

DJC networks are defined through JCL using the //*NET statement, creating dependencies between jobs.

Common JES3 Command Scenarios

Scenario 1: Finding and Managing Problem Jobs

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Step 1: Check for active jobs */ *I A /* Step 2: Get details about a specific job */ *I J 12345 /* Step 3: Hold the job to analyze it */ *F J 12345,H /* Step 4: Cancel the job if necessary */ *C J=12345 /* Step 5: Check if the job is gone */ *I J 12345

Scenario 2: Managing Output

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Step 1: Check output for a job */ *I U J=12345 /* Step 2: Change output properties */ *F U J=12345,DEST=REMOTE2,COPIES=2 /* Step 3: Hold output if needed */ *F U J=12345,H /* Step 4: Release output when printer is ready */ *F U J=12345,R /* Step 5: Verify output status */ *I U J=12345

Scenario 3: Device Management

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Step 1: Check device status */ *I D T=PRT /* Step 2: Vary a device offline for maintenance */ *V PRT001,OFFLINE /* Step 3: Change device characteristics */ *F D PRT001,FL=FORMS1 /* Step 4: Bring device back online */ *V PRT001,ONLINE /* Step 5: Start the device */ *X PRT001

Scenario 4: Dependent Job Control

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Step 1: Display DJC networks */ *I N ALL /* Step 2: Display details of a specific network */ *I N PAYROLL /* Step 3: Hold a network before critical time period */ *F N PAYROLL,H /* Step 4: Release network when ready to run */ *F N PAYROLL,R /* Step 5: Monitor network progress */ *I N PAYROLL

Best Practices for JES3 Command Usage

  • Use display commands first: Always use inquiry commands (*I) to verify the target before using action commands like modify (*F) or cancel (*C).
  • Understand global vs. local: Be aware of which commands need to run on the global processor versus local processors, and specify destination when needed.
  • Leverage DJC: Use JES3's Dependent Job Control for complex job networks rather than implementing dependencies in individual jobs.
  • Consider resource impact: Commands that affect resources managed by JES3 (like devices or initiators) can impact multiple systems, so use them judiciously.
  • Document significant commands: Keep a log of major JES3 commands issued, especially during problem troubleshooting or system maintenance.
  • Use the correct syntax: JES3 command syntax can differ from JES2. For job numbers, sometimes a space is used (*I J 123) and sometimes an equals sign (*C J=123).

JES3 Migration Considerations

With IBM's announcement that JES3 will eventually be discontinued, many organizations are considering migration options:

  • JES2 Migration: Moving to JES2 requires command changes, JCL adjustments, and procedural updates.
  • JES3plus: A compatible replacement from Phoenix Software International that maintains JES3 functionality and commands.
  • Command Translation: Tools are available to help translate JES3 commands to JES2 equivalents during transition periods.
  • Operator Training: Operators need retraining in either scenario, as command syntax and concepts differ.

JES3 Commands Exercises

Exercise 1: Job Management

Write the JES3 commands to: (1) Display all jobs named PAYROLL, (2) Hold all PAYROLL jobs, (3) Change the class of job 1234 to A, and (4) Cancel job 5678 with a dump.

Exercise 2: Output Management

Write the JES3 commands to: (1) Display all output for job 1234, (2) Change the form to SPEC and copies to 3, (3) Hold the output, and (4) Release the output to printer PRT001.

Exercise 3: System and Device Management

Write the JES3 commands to: (1) Display the status of all printers, (2) Vary printer PRT002 offline, (3) Change PRT002's forms to INVCE, (4) Bring PRT002 back online, and (5) Start PRT002.

Frequently Asked Questions

Test Your Knowledge

1. What prefix do JES3 commands use?

  • $
  • *
  • #
  • @

2. Which JES3 command displays information about a job?

  • *I J
  • *D JOB
  • *SHOW JOB
  • *LIST JOB

3. What command would you use to cancel a JES3 job?

  • *C J=jobname
  • *CANCEL jobname
  • *F J jobname,C
  • *F J jobname,CANCEL

4. How would you release a job that is in hold status in JES3?

  • *F J jobname,R
  • *R J=jobname
  • *RELEASE jobname
  • *A J=jobname

5. What is a unique feature of JES3 not found in JES2?

  • Support for multiple printers
  • Job output routing
  • Deadline scheduling
  • Main Device Scheduling