SYSAFF Parameter

Purpose

The SYSAFF parameter specifies which systems in a JES2 multi-access spool configuration are eligible to process a job. It allows you to limit job execution to specific systems or system groups based on workload balancing requirements, hardware considerations, or application availability.

Note:

SYSAFF is a JES2-specific parameter and is not available in JES3 environments. JES3 uses //*MAIN statements with the SYSTEM parameter for similar functionality.

Syntax

Basic Format

jcl
1
//jobname JOB parameters,SYSAFF=system

Multiple Systems Format

jcl
1
//jobname JOB parameters,SYSAFF=(SYS1,SYS2,...)

System Group Format

jcl
1
//jobname JOB parameters,SYSAFF=groupname

With Negation

jcl
1
//jobname JOB parameters,SYSAFF=(-SYS1,-SYS2)

Any System Format

jcl
1
//jobname JOB parameters,SYSAFF=*

Parameter Values

ValueDescription
systemA 1-4 character system name or system ID defined in the JES2 initialization parameters
(SYS1,SYS2,...)A list of system names, any of which can process the job (OR condition)
groupnameA 1-8 character name of a system group defined in JES2 initialization parameters
(-SYS1,-SYS2)Negation syntax: any system except those listed can process the job
*Any system in the JES2 multi-access spool configuration can process the job (default if SYSAFF is omitted)

Usage Examples

Single System Affinity

jcl
1
2
//PAYJOB1 JOB (ACCT1),'PAYROLL',CLASS=A, // SYSAFF=SYS1

This job will only run on the system named SYS1.

Multiple System Affinity

jcl
1
2
//PAYJOB2 JOB (ACCT1),'PAYROLL',CLASS=A, // SYSAFF=(SYS1,SYS2,SYS3)

This job can run on any of the systems SYS1, SYS2, or SYS3.

System Group Affinity

jcl
1
2
//PAYJOB3 JOB (ACCT1),'PAYROLL',CLASS=A, // SYSAFF=PAYGRP

This job will run on any system in the system group PAYGRP.

Negation Example

jcl
1
2
//TESTJOB JOB (ACCT1),'TESTING',CLASS=A, // SYSAFF=(-SYS1,-SYS2)

This job will run on any system except SYS1 and SYS2.

Implementation Details

Workload Balancing Considerations

SYSAFF is often used in conjunction with JES2 workload management features:

  • It can direct specific types of jobs to specific systems based on capacity or specialized hardware requirements
  • It helps prevent overwhelming a single system with too many jobs
  • It can be used to isolate test jobs from production systems

JES2 Initialization Parameters

SYSAFF relies on system definitions in JES2 initialization parameters:

jcl
1
2
3
4
5
6
7
MEMBER(SYS1) /* System name definition */ SYSNAME=SYS1 ... MEMBER(SYS2) SYSNAME=SYS2 ... GROUP(PAYGRP) MEMBERS=(SYS1,SYS2) /* Group definition */

System groups are defined using the GROUP parameter in JES2 initialization, associating multiple systems with a single group name.

Job Selection Process

When a job with SYSAFF is submitted:

  1. JES2 evaluates the SYSAFF parameter to determine eligible systems
  2. The job is placed on the JES2 job queue with the affinity information
  3. Only systems matching the affinity specifications will select the job for execution
  4. If a system is down or unavailable, the job will wait until a specified system becomes available

Common Use Cases

Hardware-Specific Requirements

  • Specialized processors - Running jobs on systems with specific hardware capabilities
  • Memory requirements - Directing high-memory jobs to systems with greater memory capacity
  • Device availability - Running jobs on systems with access to specific devices or peripherals

Software-Specific Requirements

  • Software licensing - Running jobs on systems where specific software products are licensed
  • Application availability - Directing jobs to systems where required applications are installed
  • Version requirements - Running jobs on systems with specific versions of software

Operational Scenarios

  • Disaster recovery - Moving workloads to specific systems during DR scenarios
  • Maintenance windows - Excluding systems undergoing maintenance
  • Environment separation - Isolating test and production workloads

Best Practices

  1. Use system groups for flexibility rather than hardcoded system names
  2. Document system group definitions and usage policies
  3. Consider specifying multiple systems to provide failover capability
  4. Use SYSAFF with CLASS parameters for comprehensive workload management
  5. Test SYSAFF changes in non-production environments first
  6. Be cautious with negation syntax as it can have unintended consequences when systems are added
  7. Consider using WLM (Workload Manager) policies in conjunction with SYSAFF for optimal job routing

Troubleshooting

Common Issues

IssuePossible Causes & Solutions
Job not running
  • Specified system(s) may be offline or inactive
  • System group may not be defined correctly
  • Check system status with $D MEMBER command
Job runs on incorrect system
  • System group definitions may have changed
  • Check system group definitions with $D GROUP command
  • Verify spelling of system name or group name
JCL error for SYSAFF
  • Syntax error in SYSAFF specification
  • System or group name not recognized
  • Check JES2 initialization parameters
Long wait times
  • All eligible systems may be busy or unavailable
  • Consider broadening SYSAFF to include more systems
  • Check system status and workload

JES2 Commands for Troubleshooting

jcl
1
2
3
4
5
$D MEMBER /* Display member status */ $D GROUP /* Display group definitions */ $D JOBQ,SYSAFF= /* Display jobs with specific system affinity */ $T MEMBER,NAME= /* Modify member properties */ $T JOB,SYSAFF= /* Modify job's system affinity */

JES2 vs. JES3 Considerations

SYSAFF is a JES2-specific parameter. In JES3 environments, similar functionality is achieved through //*MAIN statements:

JES2JES3 Equivalent
jcl
1
2
//TESTJOB JOB ... // SYSAFF=SYS1
jcl
1
2
//TESTJOB JOB ... //*MAIN SYSTEM=SYS1
jcl
1
2
//TESTJOB JOB ... // SYSAFF=(SYS1,SYS2)
jcl
1
2
//TESTJOB JOB ... //*MAIN SYSTEM=(SYS1,SYS2)

Related Concepts